Reputation: 83
When Creating a Shipment via API in Acumatica, I receive the error
Another process has updated 'SOOrder' record. Your changes will be lost
The way we create the Shipment is as follows:
The issue happens if the user loads the created shipment in Acumatica right after it has been created. Then, when the API attempts to post the shipment details (Steps 4 to 6), the API throws the error
PX.Data.PXLockViolationException: Error #90: Another process has updated 'SOOrder' record. Your changes will be lost.
Is there anyway we can avoid that Lock Violation Exception when editing a Shipment that is currently opened in the UI?
Upvotes: 1
Views: 724
Reputation: 3783
Saving a shipment triggers a long-running, asynchronous operation. You need to wait for this process to complete before you do anything else, by calling GetProcessStatus() and retrying until it is completed. Otherwise, you'll run into concurrency issues with your second update call.
Upvotes: 5