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)

Purchase order auto approval

(0) ShareShare
ReportReport
Posted on by 717

Hi All,

I have to implement some logic when the purchase order is approved. In my scenario, based on some conditions, my purchase order is auto approved.

Can somebody help me, which class is used to do the purchase order auto approval. 

Thanks in advance!!

Regards,

Pradeep

*This post is locked for comments

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Pradeep,

    Do you mean that the PO is confirmed or that somebody has to approve a created PO through a workflow?

    At which stage should the approval occur?

    Would be great if you could provide us some additional information here.

    Many thanks,

    Ludwig

  • Pradeep_Prakash Profile Picture
    717 on at

    Hi Ludwig,

    If my lineamount is less than 1000$ its getting auto approved when the user submits for workflow. When the Document state changes to approved, I want to implement some logic.

    Nobody is approving it manually, its happening automatically based on setup workflow setup.

    Thus, if you could help me, which class is used for this auto approval process, would really help me.

    Regards,

    Pradeep

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Pradeep,

    From what you write above I cannot see the necessity to change something on the standard purchase order workflow.

    You can setup automatic purchase order workflow actions that automatically approve the PO if the amount is less than $1000.

    Is there something else that you want to have incorporated and that is possibly not available in the standard workflow?

    Best regards,

    Ludwig

  • Pradeep_Prakash Profile Picture
    717 on at

    Yes, when Purchase Order is approved, I want to do an automatic PurchaseInquiry and print the invoice based on print managements settings.

    Regards,

    Pradeep

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Pradeep,

    What kind of inquiry do you want to run exactly?

    And printing the invoice means that you want to print a proforma-invoice before any product receipt and/or invoice is posted, right?

    Best regards,

    Ludwig

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi,

    I still do not understand why some code adjustment is required here. There is the pro forma invoice functionality available in the standard application and you can automatically print those invoices by setting up a respective batch job, which prints the selected (filtered) data needed. Do I overlook something here?

    Best regards,

    Ludwig

  • Verified answer
    Pradeep_Prakash Profile Picture
    717 on at

    Hi All,

    I was able to find the solution. Only if its manual approval, workflow comes into "PurchWorkflowApproval" class.

    If its automatic, it runs on sysworkflowqueuemanager --> SysWorkflowQueue --> dispatch --> WorkflowCompleted in this method PurchTable document status changes to "Approved".

    It never reaches to Event handlers class for the related workflow.

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