MODIFYALL Function (Record)
Modifies a field in all records within a range that you specify.
Record.MODIFYALL(Field, NewValue [, RunTrigger])
Type: Record The record that contains the field that you want to modify.
Type: Field The field that you want to modify.
Type: Any The value that you want to assign to Field in all records. The data type of NewValue must match the data type of Field.
Type: Boolean If this parameter is true, the code in the OnModify Trigger is executed. If this parameter is false (default), the code in the OnModify trigger is not executed.
If no filter is set, the field is modified in all records in the table. If a filter is set, the fields are modified only in the records which fall within the range specified by the filter.
The OnValidate (Fields) Trigger is never executed when MODIFYALL is used.
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;