Hi there, I'm observing a RCRD_HAS_BEEN_CHANGED wh...
# suitescript
n
Hi there, I'm observing a RCRD_HAS_BEEN_CHANGED when I do record.submitFields(). I am a bit perplexed because my understanding is that record.submitFields() simply writes to the database without a load/save. I think of it as an "atomic" operation. So, I can't understand why we would ever run into a RCRD_HAS_BEEN_CHANGED. 1. Does anyone have insights? 2. Also, is it correct that RCRD_HAS_BEEN_CHANGED will only be triggered when an update to the same field is attempted? Cheers!
a
submitFields triggers an XEDIT event, if you have scripts considering XEDIT or triggering on XEDIT, those may be triggering the RCRD_HAS_BEEN_CHANGED error, another thing to consider is that 90% of the time this error is because of Workflow trying to do something in a wrong way. Disable workflows and test and then go for the workflow doing the wrong operation.
🙌 1
r
Second that. This also happens due to improper context filtering in SuiteScripts.
🙌 1
n
Thanks both. My thinking was completely off. Of course, XEDIT!
💯 1