18
There is no way to ModifyAll() of a given field within a RecordRef record set to have a new value. This means we either have to

(a) write non-generic code, copied and pasted for each table that needs ModifyAll()d... or
(b) do it by FindSet(true)/repeat/Modify()/etc. - which is a lot slower as it needs to pull and iterate all rows from SQL.

Please add a way with RecordRef and/or FieldRef to achieve the same thing as Record.ModifyAll(Field, NewValue, RunTrigger) - i.e. to direct SQL Server to do an UPDATE Table SET Field = NewValue.

Thanks!
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

Comments

D

This could take the form of RecordRef.ModifyAll(FieldNo, OldValueVariant, NewValueVariant, RunTrigger)
and would act the same as Record.ModifyAll(Field, OldValue, NewValue, RunTrigger).
This seems like the most logical syntax and most consistent with how records and RecordRefs do things currently.

(I presume doing it as FieldRef.ModifyAll(OldValueVariant, NewValueVariant, RunTrigger) is undesirable and perhaps not possible, as then you're telling a reference to a field in one record to actually modify all in its parent RecordRef.)

Category: Development