confirmation if a filed is changed

I have a decimal field (freight amount) in sales header table if someone change the amount in freight amount field i want the confirm message before changing it,

If you are using old version of NAV, you can code on SalesHeader OnModify or OnValidateFreightAmout

If NOT CONFIRM(‘DO you really want to update?’,false) then

ERROR('You have not updated);

If you use OnValidate Trigger, then it will only trigger when SalesHeader.Validate(FIELD,VALUE);

If you use SalesHeaderOnModify then remember to check if value is changed, it to will only be triggeret if MODIFY(TRUE) is used.

If your are using 2016 and up, the you can use a eventsubscriper to do this.,then you can run your code even if TRUE is not set in SalesHeader.Modify

i m using navision 2013 R2

My freight value comes from another table if it is zero than confirm message should no come if it has some value like eg : freight amount = 500 if the user changes to 600 it should give confirm message.

Then you need to code it on the table.

You can added a check before confirm…

how can i add check ??

Use a IF statement…

Perhaps you should start by reading the developer guide in you F1 in development environment. It is actually a bunch of useful information if your are just getting into NAV development


You can handle this Globally as well!!