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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Update conflict error

(0) ShareShare
ReportReport
Posted on by 3

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

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans