Export (0) Print
Expand All

DELETEALL Function (Record)

Microsoft Dynamics Nav 2009

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




Type: Boolean

Specifies whether to run the C/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 (default), then the code in the OnDelete trigger will not be executed.

The default value is false.


Type: Record

Identifies the table in which the deletion will occur. Only those records selected by the filters set for Record are deleted.

This example requires that you create a Record variable for the Customer table named CustomerRec.

// This C/AL code:
WHILE CustomerRec.FIND('-') DO
// Performs the same operation as:

When RunTrigger is false (the default) the DELETEALL function in this example is much faster than the DELETE function because it requires only one call to the server, while the first method requires multiple calls. If RunTrigger is true, there will not be any gain in performance because each record needs to be loaded to the client anyway, in order to execute the OnDelete trigger.

Community Additions

© 2014 Microsoft