14
I suggested this in https://github.com/microsoft/AL/issues/6402:

I 've always wondered why the ModifyAll() keyword has an optional third Parameter to execute the OnModiy() trigger and does not have another to optionally execute the OnValidate() trigger of the field.

Actual:
procedure ModifyAll(Field: Joker, NewValue: Joker, [RunOnModifyTrigger: Boolean])

Suggested:
procedure ModifyAll(Field: Joker, NewValue: Joker, [RunOnModifyTrigger: Boolean], [RunOnValidateTrigger: Boolean])

In some scenarios with a few records like this one, it could dramatically reduce the number of lines of code needed...

Before (actual code):
if TestMethodLine.FindSet( true ) then
repeat
TestMethodLine.Validate( Result, TestMethodLine.Result::" " );
TestMethodLine.Validate( Run, NewRunValue );
TestMethodLine.Modify( true );
until TestMethodLine.Next() = 0;

After (with new optional parameter):
// RunOnModifyTrigger = false and RunOnValidateTrigger = true
TestMethodLine.ModifyAll( Result, TestMethodLine.Result::" ", false, true );

// RunOnModifyTrigger = true , only in last consecutive ModifyAll()
TestMethodLine.ModifyAll( Run, NewRunValue, true, true );
Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future.

Best regards,
Business Central Team