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 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 Business Central, there is check to make sure that a DELETE is using the current version of the record and to make sure that another process hasn't modified and committed the record after it was read by this process.