DELETE function

The purpose of the DELETE function is to delete existing data records. The syntax for DELETE is as follows:

[BooleanValue :=] Record.DELETE ( [ TriggerControlBoolean ] )

If DELETE fails and the BooleanValue option is not used, the process will terminate with an error statement. Our code should handle any detected error or terminate the process gracefully, as appropriate.

The TriggerControlBoolean value is TRUE or FALSE, and it controls whether or not the table's OnDelete trigger fires when this DELETE occurs. The default value is FALSE. If we let the default FALSE prevail, we run the risk of not performing error checking that the table's designer assumed would be run when a record was deleted.

In NAV 2017, there is improved checking to make sure a DELETE is using the current version of the record and to make sure another process hasn't modified and committed the record after it was read by this process. It is still good practice for the program to refresh the record (using the GET function) before the DELETE function is called.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.131.168