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 ] )
When DELETE fails and the BooleanValue is not used, the process will terminate with an error statement. Our code should handle any detected error or terminate the process, 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 value in place, 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 2015, there is improved checking to make sure a DELETE is using the current version of the record, which making sure another process hasn't modified and committed the record after it was read by this process. Therefore, before the DELETE function is called, the...