Skip to main content
Dynamics 365 general forum

How to put error when delete button logic is invoke

editSubscribe (0) ShareShare
Posted on by 35
Hi everyone !
I am new to this , so i will really appreciate if someone can help me :)
What i need to do ? When the delete button on the Purchase Orders form is clicked, i need to check if Discount is greater then 0 and if so , delete is not allowed. Error should be showed, that indicate the same.
And if it is equal to 0 then delete is allowed.
Can someone help me, how to achieve this with x++ logic. 
  • Haig Liu Profile Picture
    Haig Liu on at
    How to put error when delete button logic is invoke
    Hi Anawi,
    Normally I would use ribbon workbench to add custom enable rules to the buttons.
    But if you want to use X++ logic, please refer to the following link:
    Best Regards,
    Haig Liu

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Sundar…

Industry experts answer burning questions directly from our amazing Community…

Enabling Copilot Case and Conversation…

Agents can easily recap an ongoing chat, transcribe a voice conversation…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 282,978 Super User

Martin Dráb Profile Picture

Martin Dráb 222,562 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans