Hello, We are getting the “Record has changed” err...
# suitescript
v
Hello, We are getting the “Record has changed” error in one of our environments when we try to save a Sales Order (probably because many scripts are running on Sales Order). What can be the most efficient way to implement a ‘re-try save’ mechanism for such an error?
Do we re-try saving in the same script where we get this error? Or maybe in a UE script where this error can be caught? Currently I can only think of catching this error in the same script, and calling the save() method again if the error is caught. But I somehow feel that there might be better ways to do this.
b
im guessing this is from a scheduled script or map/reduce script
in which case the usual is starting over and loading the record again
👍 1
the error is fairly common when the task is started from a user event and there are other after submit user events or after record submit workflows
it also means the performance of that record has been trashed if something from the script processor queue is running at the same time as those scripts.workflows
v
yes you are right, it originates from a scheduled script
thanks for the inputs, i also believe that it has something to do with the overall performance
for now, I will add code to re trigger the load-save part of the script
s
In my case it was in beforeLoad when i was loading and saving the rec if same in your case just try some alternate for it