Melissa
12/21/2023, 3:04 PMRecord Has Changed
error. There are a lot of UEs using AfterSubmit and WFs also using AfterSubmit in this account, so I am guessing that’s the issue. Is there a good workaround for this? Triggering the M/R a different way? a Different type of script? Any help is appreciated.erictgrubaugh
12/21/2023, 3:10 PMsave()
call(s) throwing the error, and when you catch a RECORD_HAS_CHANGED
error, retry your set*()
and save()
again.
In the long-term, it might be worth a dedicated effort to consolidate the various customizations so that the record is being submitted as few times as possible and only multiple times when it actually needs to be.Melissa
12/21/2023, 3:14 PMMike Robbins
12/21/2023, 3:40 PMfunction updateSalesOrder(orderId) {
// load and save your SO here
}
retry({
functionToExecute: updateSalesOrder,
arguments: [123],
maxTries: 3,
retryOnError: 'RECORD_HAS_CHANGED'
});
Mike Robbins
12/21/2023, 3:41 PMMelissa
12/27/2023, 6:30 PMnetamount
formula numeric field that is available via saved search, and would need that data in a beforeSubmit of a UE script. As I understand it, that isn’t available in a UE and/or not the beforeSubmit entry point, as it calculates any/all discounts, etc. on an item for that particular Sales Order. Do you know if that’s an accurate assessment? Do you know of any way to get that numeric formula value in a beforeSubmit? Thank you very much!