Modifier

Partager via


Record.DeleteAll([Boolean]) Method

Version: Available or changed with runtime version 1.0.

Deletes all records in a table that fall within a specified range.

Syntax

 Record.DeleteAll([RunTrigger: Boolean])

Parameters

Record
 Type: Record
An instance of the Record data type.

[Optional] RunTrigger
 Type: Boolean
Specifies whether to run the AL code in the OnDelete Trigger. If this parameter is true, then the code in the OnDelete trigger will be executed. If this parameter is false, then the code in the OnDelete trigger will not be executed. The default value is false.

Remarks

Important

By design, the global variables of the record instance being deleted will be initialized to their default value during the DeleteAll method execution, independently of the value that was previously set.

Note

Setting RunTrigger to false only affects the OnDelete trigger. The OnBeforeDelete and OnAfterDelete triggers from table extensions will still run regardless.

Record Data Type
Get Started with AL
Developing Extensions
AL Database Methods and Performance on SQL Server