Discussions
RCRD_HAS_BEEN_CHANGED error when submitting multiple records on user event
I have a requirement as follows:
When a Quote is saved, on the afterSubmit event, I do the following:
1) Ensure (type == create, context == userinterface)
2) Load another Quote record that is referenced in this new quote, make a change to a field, and submit that Quote record.
3) Create a new Opportunity record
4) Load the current new Quote record (using nlapiGetRecordId and nlapiLoadRecord), change the Opportunity field to point to the newly created opportunity (in step 3), and submit the Quote record.
At that points after step 4, I will get the error "RCRD_HAS_BEEN_CHANGED". I noticed then, that if I remove either of the nlapiSubmitRecord calls for the quote records (step 2 and step 4), then there are no errors. Is there any issue with submitting 2 records of the same type on a single user event?