Currently there is no way to include the ignoreFieldChange option when working with sublist fields in dynamic mode.
Depending on what updates a user does and what code exists, this can cause an infinite loop of fieldChanged events. Our current workaround is to just _.debounce the fieldChanged entrypoint.
so I'm not sure if we really need it, but one option could be to add a ignoreFieldChange property to the Sublist class so an end user could toggle it on or off. Usually if you want this on when working in dynamic mode on a sublist you want it one for all your operations. So a use case my look like this
function fieldChanged(ctx) {
const so = new SalesOrder(ctx.newRecord)
so.item.ignoreFieldChange = true
_.forEach(so.item, line => {
line.field1 = 1
line.field2 = 'hello'
line.field3 = 'world'
})
so.item.ignoreFieldChange = false // optional in this case since we're setting it `true` on entry to this function
}
Currently there is no way to include the
ignoreFieldChange
option when working with sublist fields in dynamic mode. Depending on what updates a user does and what code exists, this can cause an infinite loop offieldChanged
events. Our current workaround is to just_.debounce
thefieldChanged
entrypoint.so I'm not sure if we really need it, but one option could be to add a
ignoreFieldChange
property to the Sublist class so an end user could toggle it on or off. Usually if you want this on when working in dynamic mode on a sublist you want it one for all your operations. So a use case my look like this