Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Error in VersioningDocument.Confirm() while confirming purchase order

(0) ShareShare
ReportReport
Posted on by

Hi All,

We are getting the below error while confirming the Purchase order and the user is receiving the PO confirmation email in every 5 mins(PO confirmation batch job is scheduled for every 5 minutes).

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

   at Dynamics.Ax.Application.VersioningDocument.Confirm() in VersioningDocument.confirm.xpp:line 28

   at Dynamics.Ax.Application.VersioningPurchaseOrder.Confirm() in VersioningPurchaseOrder.confirm.xpp:line 10

   at Dynamics.Ax.Application.PurchPurchOrderJournalCreate.Initjournalheader() in PurchPurchOrderJournalCreate.initJournalHeader.xpp:line 31

   at Dynamics.Ax.Application.FormletterJournalCreate.Createjournal() in FormletterJournalCreate.createJournal.xpp:line 18

   at Dynamics.Ax.Application.FormletterJournalCreate.Run() in FormletterJournalCreate.run.xpp:line 6

   at Dynamics.Ax.Application.FormletterService.Createjournal(Common _parmTable) in FormletterService.createJournal.xpp:line 30

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

   at Dynamics.Ax.Application.FormletterService.Postpurchaseorderconfirmation(PurchFormLetterPurchOrderContract _contract) in FormletterService.postPurchaseOrderConfirmation.xpp:line 15

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

   at Microsoft.Dynamics.Ax.Xpp.DictClass.Callobject(String _methodName, XppObjectBase _Called, Object[] varArgs)

   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 4

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

   at Dynamics.Ax.Application.PoAutoConfirm.Poautoconfirm() in PoAutoConfirm.poAutoConfirm.xpp:line 67

   at Dynamics.Ax.Application.PoAutoConfirm.Run() in PoAutoConfirm.run.xpp:line 14

   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)

Please advise us how we can resolve this issue.

Regards,

Akbar

  • Akbarpasha Profile Picture
    on at
    RE: Error in VersioningDocument.Confirm() while confirming purchase order

    Hi All,

    We are getting the below error while Purchase orders are having the multiple lines, it is not occurring for Purchase orders with single line:

    "The document can be confirmed only if the approval status is In external review or Approved."

    Even Purchase orders in "Approved" status.

    Please advise us how we can resolve this issue.

    Regards,

    Akbar

  • Akbarpasha Profile Picture
    on at
    RE: Error in VersioningDocument.Confirm() while confirming purchase order

    Hi Martin,

    Above .Net exception we got this error :

    "The document can be confirmed only if the approval status is In external review or Approved."

    Even order is in Approved status.

    Regards,

    Akbar

  • Martin Dráb Profile Picture
    232,183 Most Valuable Professional on at
    RE: Error in VersioningDocument.Confirm() while confirming purchase order

    Okay, that doesn't help. You should find out what kind of exception is thrown. Try running posting outside batch and without "business operations in CIL" - it should give you a normal infolog message instead of the .NET exception.

    By the way, make sure that CIL is up to date.

  • Akbarpasha Profile Picture
    on at
    RE: Error in VersioningDocument.Confirm() while confirming purchase order

    Hi Martin,

    Line 28 is having commit statement. below is the confirm method:

    8081.info.png

    Regards,

    Akbar

  • Martin Dráb Profile Picture
    232,183 Most Valuable Professional on at
    RE: Error in VersioningDocument.Confirm() while confirming purchase order

    What code do you have at line 28?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,311 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,183 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans