Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

DMF / DIXF error - Cannot edit a record in Items (InventTrans). An update conflict occurred due to another user process deleting the record or changing one or more fields in the record

Posted on by 245

Hello,

I've been getting this error :

"Cannot edit a record in Inventory transactions (InventTrans). An update conflict occurred due to another user process deleting the record or changing one or more fields in the record" when launching the DMF Product entity ( from staging to target ).

I tried multiple workarounds, like following where the error is coming from, which is in the stack below :

Class/DMFEntityWriter.write() line 690

Class/DMFProductEntityClass.insertUpdate() line 128

Class/DMFEnityBase.insertUpdate() line 47

But it left me clueless and I cannot go further. I also tried putting a breakpoint on the update() method of InventTable, to see where it is called before the doUpdate() call of DMF, but nothing.

Any help would be wonderful! Thanks

*This post is locked for comments

  • Suggested answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: DMF / DIXF error - Cannot edit a record in Items (InventTrans). An update conflict occurred due to another user process deleting the record or changing one or more fields in the record

    No problem, just be aware that the reread must be before changing any fields on the buffer, otherwise those field values lost and gets overwritten with the value coming from the AX database.

  • Slim Rouissi Profile Picture
    Slim Rouissi 245 on at
    RE: DMF / DIXF error - Cannot edit a record in Items (InventTrans). An update conflict occurred due to another user process deleting the record or changing one or more fields in the record

    Hi Vilmos,

    Thank you for your answer it is helpful. Though I had tried to disable the OccEnabled property of the table, I got rid of the error, but the DMF didn't update anything.

    I will try to put a reread before the doUpdate in the DMFEntityBase to see if I can keep the customizations done before.

    Thank you!

  • Verified answer
    Slim Rouissi Profile Picture
    Slim Rouissi 245 on at
    RE: DMF / DIXF error - Cannot edit a record in Items (InventTrans). An update conflict occurred due to another user process deleting the record or changing one or more fields in the record

    Alright,

    Problem solved! In fact dome customization was calling the doUpdate() method of InventTable. That's why the debugger wasn't working when putting a breakpoint on the update() method.

    So the work around is to override the aosValidateUpdate() (which is always called uopn udpate) and put a breakpoint in it.

    This way I found someone had made a customization launching a doUpdate() before the actual doUpdate() of the DMF.

    That customization seemed right since the select forUpdate was done right before and it was encapsulated between ttsBegin; et ttsCommit;

    But I just had to comment it to make the DMF work again!

  • Verified answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: DMF / DIXF error - Cannot edit a record in Items (InventTrans). An update conflict occurred due to another user process deleting the record or changing one or more fields in the record

    The error message which you have quoted is from InventTrans table, so putting a breakpoint on InventTable's methods will not be too helpful.

    Such error typically comes if a record is updated after you start working with the record buffer, so RecVersion does not match. Refer to Optimistic Concurrency Control (OCC) in the documentation:

    https://msdn.microsoft.com/en-us/library/bb190073.aspx

    It is usually a caching issue, which can be resolved by calling the .reread() method on your buffer to forcibly fetch it from the database to have the most current version, ignoring the AX AOS cache.

    msdn.microsoft.com/.../xrecord.reread.aspx

    Microsoft also has hotfixes and settings for bundling DIXF processing which can also address update conflicts issues, here are the details:

    blogs.msdn.microsoft.com/.../data-importexport-framework-group-by-condition-added

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans