web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Cancel & Delete a Sales Order Packing Slip gives updateConflict Exception - Please help

(0) ShareShare
ReportReport
Posted on by 1,447

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.

4466.w.PNG

*This post is locked for comments

I have the same question (0)
  • DJRM Profile Picture
    1,447 on at
    RE: Cancel & Delete a Sales Order Packing Slip gives updateConflict Exception - Please help

    Also, there is an outer ttsbegin/ttscommit (not shown on the image).

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: Cancel & Delete a Sales Order Packing Slip gives updateConflict Exception - Please help

    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.

  • DJRM Profile Picture
    1,447 on at
    RE: Cancel & Delete a Sales Order Packing Slip gives updateConflict Exception - Please help

    Here are my updated codes:

    8204.s.PNG

    Are these okay now?

  • DJRM Profile Picture
    1,447 on at
    RE: Cancel & Delete a Sales Order Packing Slip gives updateConflict Exception - Please help

    Yes and it worked but when I try to create a new packing slip using salesFormLetter, no packing slip was created.

  • Chaitanya Golla Profile Picture
    17,225 on at
    RE: Cancel & Delete a Sales Order Packing Slip gives updateConflict Exception - Please help

    Hi,

    When you say new packing slip is not getting created is it through form UI (or) through some x++ code.

  • Brandon Wiese Profile Picture
    17,788 on at
    RE: Cancel & Delete a Sales Order Packing Slip gives updateConflict Exception - Please help

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans