How to prevent a user from deleting specific order lines

bob_upbob_up Member Posts: 155
I have modified the sales order header so that the user can enter a carriage amount. When they do this, a G/L order line is automatically created with a boolean to identify that it is a special type of line. I have added some code to the order line OnDelete trigger to warn the user if they try to delete this carriage line. This works as intended

However the code in the OnDelete trigger of the order lines is also executed if the user tries to delete the whole order. I dont want to display the warning in that situation.

Is there some way to know if the order line is being deleted because the whole order is being deleted ?

Answers

Sign In or Register to comment.