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
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.
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!
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!
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
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,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156