MODIFYALL Function (Record)
Modifies a field in all records within a range that you specify.
The record that contains the field that you want to modify.
The field that you want to modify.
The value that you want to assign to Field in all records. The data type of NewValue must match the data type of Field.
If this parameter is true, the code in theis executed. If this parameter is false (default), the code in the OnModify trigger is not executed.
This example requires that you create the following variable in the C/AL Globals window.
// The result of this statement: CustomerRec.MODIFYALL("Statistics Group", 2); // is equivalent to: IF CustomerRec.FIND('-') THEN REPEAT CustomerRec."Statistics Group" := 2; CustomerRec.MODIFY; UNTIL CustomerRec.NEXT = 0;