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)

UpdateConflictException when I post a packing slip with batch

(0) ShareShare
ReportReport
Posted on by 20

Hello,

I am using a batch to post packing Slip.

Herebelow are the errors messages that I got:

Microsoft.Dynamics.Ax.Xpp.UpdateConflictException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.UpdateConflictException' was thrown.

   at Dynamics.Ax.Application.FormletterService.Run() in FormletterService.run.xpp:line 158

   at Dynamics.Ax.Application.FormletterService.Postpurchaseorderpackingslip(PurchFormLetterPackingSlipContract _contract) in FormletterService.postPurchaseOrderPackingSlip.xpp:line 14

   at FormletterService::postPurchaseOrderPackingSlip(Object , Object[] )

   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)

   at Dynamics.Ax.Application.SysOperationServiceController.Runoperation(Boolean _async) in SysOperationServiceController.runOperation.xpp:line 93

   at Dynamics.Ax.Application.SysOperationServiceController.Run() in SysOperationServiceController.run.xpp:line 27

   at Dynamics.Ax.Application.FormLetterServiceController.Run() in FormLetterServiceController.run.xpp:line 3

   at Dynamics.Ax.Application.PurchFormLetter.Run() in PurchFormLetter.run.xpp:line 45

   at Dynamics.Ax.Application.DMFMIDImportPackingSlipClass.Post(PurchTable _purchTable, PurchParmTable _parmTable) in DMFMIDImportPackingSlipClass.post.xpp:line 22

   at Dynamics.Ax.Application.DMFMIDImportPackingSlipClass.Posttargetprocess(DMFDefinitionGroupExecution _dmfDefinitionGroupExecution) in DMFMIDImportPackingSlipClass.postTargetProcess.xpp:line 30

   at DMFMIDImportPackingSlipClass::postTargetProcess(Object , Object[] )

   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)

   at Dynamics.Ax.Application.AVADMFEntityWriter.Write(DMFDefinitionGroupExecution _definitionGroupExecution, String _definitionGroup, String _executionId, DMFEntity _entity, Boolean _onlyErrored, Boolean _onlySelected, Int64 _startRefRecId, Int64 _endRefRecId, Boolean , Boolean ) in AVADMFEntityWriter.write.xpp:line 754

   at Dynamics.Ax.Application.AVADMFEntityWriter.Write(DMFDefinitionGroupExecution _definitionGroupExecution, String _definitionGroup, String _executionId, DMFEntity _entity, Boolean _onlyErrored, Boolean _onlySelected, Int64 _startRefRecId, Int64 _endRefRecId)

   at Dynamics.Ax.Application.DMFEntityWriter.runOnServerWriter(DMFDefinitionGroupExecution _definitionGroupExecution, String _definitionGroup, String _executionId, DMFEntity _entity, Boolean _onlyErrored, Boolean _onlySelected, Int64 _startRefRecId, Int64 _endRefRecId, DMFEntityWriter _entityWriter) in DMFEntityWriter.runOnServerWriter.xpp:line 14

   at Dynamics.Ax.Application.DMFEntityWriter.Run() in DMFEntityWriter.run.xpp:line 98

   at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54

   at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13

   at BatchRun::runJobStatic(Object[] )

   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)

   at BatchIL.taskThreadEntry(Object threadArg)

Thanks for your assistance

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Can you please explain your process? In the call stack I can see Data Management Framework calls for packing slip import, so technically this is not just a simple packing slip posting. Is this a customization you are using to run this packing slip update?

    Update conflict means the fetched or cached record on the AX AOS/client is outdated compared to what is in the database. AX knows this by taking a look at the RecVersion. You could try to go around by calling TableThatFailsDuringProcessing.disableCache(true) to force reading from the database at the point where the record is first fetched.

    Alternatively you could call TableThatFailsDuringProcessing.reread() to force fetching the latest value from the SQL database, before you start changing the field values on the buffer.

  • Arnaud Sodji Profile Picture
    20 on at

    Actually, I am importing packing slip using DMF.

    The batch process is using the depository type. So there are several tasks on the import batch and each task is processing one packing slip.   I am considering right now to disable the OCC property (https://hellodax.com/2014/07/07/microsoft-dynamics-ax-xpp-updateconflictexception/)

    on PurchTable to allow the update of one PO by several task.

    I keep u posted about the resuslt.

  • Suggested answer
    Arnaud Sodji Profile Picture
    20 on at

    Hello,

    I've managed to pass this issue by disabling the OCC property on PurchTable.

    Thanks for your assistance.

    B R,

    Arnaud

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