Answered
Failed to save record because Record has been changed
I am trying to create/update Inventory adjustment record in NetSuite but it failed with following error
"Failed to save record because Record has been changed"
0
Comments
No Steve Klett, IIO APIs are not counted against your license. See https://docs.celigo.com/hc/en-us/articles/4408761750555-Review-available-subscription-endpoints.
-Matt
Hi Moazam Saleem,
Could you provide more information here so that we can try to help? Are all records failing? How do you have your flow set up?
Hi Courtney, I am exporting real time data from external system and trying to create Inventory adjustment records into NetSuite during creation it goes successful but failed sometimes on update.
Hi Moazam Saleem,
Thanks for getting back to us. I think your best route here is to open a support ticket if you haven't already. I can open one for you from this post if you haven't opened one yet. Let me know!
Here is what I suspect is happening. There are probably multiple events/records/updates for the same inventory adjustment in NetSuite being sent to the listener in your flow, and then the 'concurrency level' on your NetSuite connection is probably set to something > 1, which means that there are parallel updates being sent to NetSuite for the same Inventory Adjustment record, and then NetSuite returns this error whenever two updates collide.
This should be an easy thing to solve, and I highly recommend reading this article to guide you.
https://docs.celigo.com/hc/en-us/articles/360050579791-Preserve-the-order-of-records-when-using-concurrency
Scott Henderson There is another scenario where this error is encountered: NetSuite accounts with significant User Event scripts and Workflows. We have a client right now and 10% of the time when I update a Sales Order from IIO I hit the dreaded "Failed to save record because Record has been changed". There is so much database activity on the orders that you can't avoid encountering it.
The REAL problem is there's no way to handle this in IIO. The flow I'm referring to uses branching and has 3 Import steps. Any one of those steps could throw this error. It's an expected error, I can't rely on the client to monitor IIO all day and retry when this happens, not to mention the flow is handling a time sensitive use case. I should be able to handle it.
What's the solution? I'm worried, because I'm not coming up with one, not with the current available tools.
I think IIO should add support for retrying when this error is encountered. New advanced Import option to retry for this specific error (or support defining a list of expected errors that should be retried) when encountered. Maybe even with a retry count, because in my case I'd hammer away 2,3 or 5 times if I need to to get my darn update to succeed.
Of course, maybe there already is a way to retry and I'm wrong when I claim there isn't?
Hey Steve, someone on my team will get back to you on this next week. I am thinking we should be classifying this error as an 'intermittent' error, and then we should be auto retrying on your behalf (like we do for all intermittent errors), but let's see what the team comes back with.
Steve Klett, not that this is the most ideal solution here, but you could also use the /error endpoints to retry the errors. What I've done in the past is make a flow to get errors for the flow you want, then have an import step on the flow to retry based on the error message and/or error code. The flow could be scheduled for however often you want.
https://docs.celigo.com/hc/en-us/articles/7708779714715-Errors-API-endpoints#retry
Scott Henderson - that sounds like a great option. I completely overlooked the error classification and existing retry support already in the system. OK, cool! I'll wait to hear from someone next week.
Tyler Lamparter The IIO APIs impress, once again. Your idea is a good one, and although I hope to avoid it (waiting to see what Scott's team comes back with), it may be just what I need to address my issue. I wonder if you know if a connection to the IIO APIs will count as an endpoint or are there licensing implications?
I appreciate the reply and good idea, Tyler - thank you.
Steve Klett The error "Failed to save record because Record has been changed" will be classified as intermittent and then auto-retry will kick-in. We will soon release a fix and share the timeline.
Ravi Pratap Singh
The error "Failed to save record because Record has been changed" is now classified as Intermittent. We recommend keeping Auto-resolve enabled on the flow where this error occurs as integrator.io will automatically retry Intermittent classified errors.
Please sign in to leave a comment.