Process question: We have a Task User Event with ...
# suitescript
s
Process question: We have a Task User Event with an afterSubmit that updates two custom fields on the related Customer record, to record the date the last Task was closed, and how many days the last Task was open. This has worked well for years and for many users, however we have one user that is consistently triggering RCRD_HAS_BEEN_CHANGED errors when saving the Customer changes while closing tasks. I can’t reproduce it and no one else can either. Is it safe to just catch that particular error and try the save again? Or, do I need to re-load the customer record and re-apply the changes then try saving again if that error is caught?
b
you dont have the option of trying again
you have to start over from loading the customer
s
thanks, that actually makes sense, the customer record is out of date, so I’d need to re-load it from scratch for it to work. Thank you!
b
another option might be to submitFields, though thats not really sane if you dont know what is changing the record in the first place
s
Yeah, someone else created this process and I am not entirely certain about why parts of it are the way they are, so I am trying to fix things with as light a touch as possible.