# Record.ModifyAll(Any, Any [, Boolean]) Method
> Version: _Available or changed with runtime version 1.0._
Modifies a field in all records within a range that you specify.
## Syntax
```al
 Record.ModifyAll(Field: Any, NewValue: Any [, RunTrigger: Boolean])
```
## Parameters
Record
Type: record-data-type
An instance of the record-data-type data type.
Field
Type: ../any/any-data-type
The field that you want to modify.
NewValue
Type: ../any/any-data-type
The value that you want to assign to Field in all records. The data type of NewValue must match the data type of Field.
*[Optional] RunTrigger*
Type: ../boolean/boolean-data-type
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.
## Remarks
> IMPORTANT
> By design, the global variables of the record instance being modified will be initialized to their default value during the ModifyAll method execution, independently of the value that was previously set.
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. Records where the field is already equal to the new value are also updated.
The OnValidate field trigger is never run when ModifyAll is used. Using ModifyAll() is recommended if field validation is not wanted or needed. Otherwise, record-modify-method can be used.
## Example
```al
var
    customerRec: record Customer;

begin
    // 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;
end;

```
## Related information
record-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>
../../../administration/optimize-sql-al-database-methods-and-performance-on-server

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-modifyall-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/record/record-modifyall-method/
