Confirmation Dialog if field value is greater than certain amount


I am looking to add a confirmation dialog box to my Sales Order Header page if a user inputs an unexpectedly large amount.

For example, if a user enters in a sales order with an amount of $50,000 I want a message to display in the RTC that asks the user if they would like to proceed.

I have written the below C/AL code which I'm sure is wrong. I would be very appreciative if someone could point me in the right direction. Thanks!

Amount - OnValidate()
IF ("Amount" > 50000) THEN
ERROR('Request Cancelled');


  • Options
    sorenhinrupsorenhinrup Member Posts: 136
    This would require the order administrator to input directly into the Amount field - I don't think that is the norm.
    I would recomend to put this into the release function, as multiple discounts are calculated when releasing.
    The code you wrote will throw and error, when the user states Yes to the confirmbox and the salesorder release will stop.
Sign In or Register to comment.