Mike Robbins
06/21/2024, 9:43 PMignoreFieldChange
property on record.setValue()
server a purpose in server-side scripts? Based on the name alone, it seems like it would only impact client-side scripts.
In the docs it says record.setValue()
is for both client and servers scripts but the property name has me questioning it's value server-side.Anthony OConnor
06/21/2024, 9:48 PMMike Robbins
06/21/2024, 9:55 PMfieldChange
events that we might want to ignore?Anthony OConnor
06/21/2024, 10:11 PMDynamic mode:
When a SuiteScript 2.x script creates, copies, loads, or transforms a record in dynamic mode, the record's body fields and sublist line items are sourced, calculated, and validated in real time. A record in dynamic mode emulates the behavior of a record in the UI.
When you work with a record in dynamic mode, the order in which you set field values matters. For some developers, this aspect might feel constraining. It is likely that scripting in dynamic mode will require you to refer back to the UI often. For example, on an invoice in the UI, you would not set the Terms field before setting the Customer field. The reason is that as soon as you set the Customer field, the value of Terms will be overridden. On an invoice, the value of Terms is sourced from the terms specified on the Customer record. The same behavior happens in dynamic scripting. In your scripts, if you do not set field values in the order that they are sourced in the UI, some of the values you set could be overridden.
Anthony OConnor
06/21/2024, 10:13 PMMike Robbins
06/24/2024, 3:17 PMignoreFieldChange
much myself except in client scripts, but for some reason other developers where I work specify this property every time they call .setValue()
.
Since fieldChange is a very specific client script event I was just curious about the impact on server scripts, and there may be none.Anthony OConnor
06/24/2024, 3:31 PMAnthony OConnor
06/24/2024, 3:32 PMMike Robbins
06/24/2024, 3:36 PMAnthony OConnor
06/24/2024, 3:39 PMMike Robbins
06/24/2024, 3:42 PMAnthony OConnor
06/24/2024, 3:42 PMAnthony OConnor
06/24/2024, 3:43 PMAnthony OConnor
06/24/2024, 3:43 PMMike Robbins
06/24/2024, 3:45 PMAnthony OConnor
06/24/2024, 3:46 PMMike Robbins
06/24/2024, 3:47 PM