`RECORD HAS BEEN CHANGED` errors on item fulfillm...
# suitescript
j
RECORD HAS BEEN CHANGED
errors on item fulfillment script? I included a .
save()
Any way to bypass this?
e
There are two scripts/people/something trying to edit/save the record at the same time, one workaround (could also fail for some scenarios) would be adding a try/catch , in the catch verify if the record has changed happened, then try to rerun your logic again or maybe just .save again your record (take into account that the other script/person might have changed some relevant data for your logic)
👍 1
s
@JC biggest culrprit if you ask me, for record has been changed is usually workflow. If you have workflow actions running whilst having workflow action scripts, merge them. (in the same workflow in the same state) (like you run set value on entry, and also a wfa script on entry, merge them.) Work only in workflowaction scripts and make sure your workflows run one state at a time. instead of flying between states to do things. If there are no workflows, then you gotta figure out what other stuff is doing rec.load, rec.save, and you'd want to change them to inline edits. My 5 cents ^_^
👍 1
122 Views