Hi,
I am trying to cancel and delete a sales order packing slip but AX gives me an UpdateConflict exception. Please help. I am sure that I am the only one using AX so it really confuses me why there is an updateConflict.
*This post is locked for comments
Why would you ever delete a customer packing slip? The UI doesn't let you do it, and for good reason. You can cancel and correct them, to 0 if necessary, but you should leave the records of posted journals.
Hi,
When you say new packing slip is not getting created is it through form UI (or) through some x++ code.
Yes and it worked but when I try to create a new packing slip using salesFormLetter, no packing slip was created.
Here are my updated codes:
Are these okay now?
Hi,
There are couple of things that need to be changed. If you delete the record from packingslipjour, it automatically deletes it from packingslipTrans as delete action of type cascade is defined on table CustPackingSlipTrans and no need to explicitly delete packingslipTrans. (Path: \Data Dictionary\Tables\CustPackingSlipJour\DeleteActions\CustPackingSlipTrans)
Next, write the statement packingSlipJour.reread() before delete statement and remove update while selecting the record and use following statements:
packingSlipJour.reread();
ttsbegin;
packingSlipJour.selectforupdate(true);
packingSlipJour.delete();
ttscommit;
Hope this helps you.
Also, there is an outer ttsbegin/ttscommit (not shown on the image).
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156