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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Update conflict error

(0) ShareShare
ReportReport
Posted on by 67

Hi All,

I am getting this error message when i try to update the purchase order line.

"An update conflict occurred due to another user process deleting the record or changing one or more fields in the record."

I tried reread, RecVersion method. But not working.

Please help me to solve this issue.

Once i got this error, It is coming continuously.

 

Thanks in advance,

Hari

*This post is locked for comments

I have the same question (0)
  • MuthukumaranAX Profile Picture
    2,903 on at

    Hi,

    I think it may be because of two many users are accessing the same record. if you lock the record from updation from other users it will resolve the issue.

    May be this helps you. let me know if you are writing the code.

    Thanks

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Hari,

    Following error you get if you have following scenario,

    Static void NIT_update1(Args _args)

    {

       NIT_SKUTable        SKUTable1;

       NIT_SKUTable        SKUTable2;

       ttsBegin;

             select forupdate SKUTable1 where SKUTable1.SKUID == 1;

             //do something

             ttsBegin;

                     select forupdate SKUTable2 where SKUTable2.SKUID == 1;

                     SKUTable2.Qty = 50;

                     SKUTable2.update();

                     // do something more

             ttsCommit;

             // do something more and more

             SKUTable1.Qty = 60;

             SKUTable1.update();    

       ttsCommit;

    }

    to avoid error you need to write following code

    Static void NIT_update2(Args _args)

    {

       NIT_SKUTable        SKUTable1;

       NIT_SKUTable        SKUTable2;

       ttsBegin;

             //do something

             ttsBegin;

                     select forupdate SKUTable2 where SKUTable2.SKUID == 1;

                     SKUTable2.Qty = 50;

                     SKUTable2.update();

                      // do something more

             ttsCommit;

               // do something more and more

              select forupdate SKUTable1 where SKUTable1.SKUID == 1;

             SKUTable1.Qty = 60;

             SKUTable1.update();    

       ttsCommit;

    }

    So moral of the story is,

    when implementing logic in SQL transaction, create the transaction with atomicity

    that is, Select the record for update just before calling table update() method.

    Please try to investigate your customization, may be you will also have same scenario.

    Please verify.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans