web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to disable the Approve button on Purchase Order Workflow

(0) ShareShare
ReportReport
Posted on by 2

Hi,

We have a requirement to disable the Approve button in Purchase order workflow as we are doing integration and making it approve through code.

It is not possible to achieve it through workflow config as its giving error while disabling it from configurations.

Please help

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    236,353 Most Valuable Professional on at
    RE: How to disable the Approve button on Purchase Order Workflow

    Why do you assign the approval to that user if you don't want him or her to do the approval?

  • SouravDam Profile Picture
    11,730 on at
    RE: How to disable the Approve button on Purchase Order Workflow

    Hi Sarika Srivastava,

    Do you mean to say that, PO also will be created through integration and not by creating it manually in ERP?

    If PO is created in ERP through integration -- Then you don't need to set the approval workflow for PO. Rather, you can flow PO in D365 through integration with workflow approval status being 'Approved' itself. No manual approval will come in scenario in this case. But one more concern. If user wants to do a request change to edit the approved PO, then it will trigger back for approval. Therefore, through integration, you have to bring the approved update status in D365 for the same PO once it is 'Approved' again. You have to record this status change for PO in ERP.

    If PO is created manually in ERP -- In that case, I don't think it is logical to set the 'Approve' button disable in ERP once the PO is reviewed and accepted by the approver. Once the approver clicked on 'Approved', how could you set a halt in system to get the PO approved through coding?

    Appreciate if you can check above scenarios and update us in this forum.

    Best regards,
    Sourav Dam

    Please take time to click 'Yes' against the answers that help you guide in right direction to help other community members.

  • Sarika laroia Profile Picture
    2 on at
    RE: How to disable the Approve button on Purchase Order Workflow

    Hi Martin,

    PO Workflow will be having all the std menu items ,just when we are doing the integration from SAP and getting success then we are going and making the PO as approved (workflow action) but still the PO Approve button can be visible  so I want to hide it.

    The extension to the PurchTableApproval is not available and if I'm trying to do from workflow configuration its giving me error.

    Is there any way possible to hide it (either make visible false or disable it)

  • Sarika laroia Profile Picture
    2 on at
    RE: How to disable the Approve button on Purchase Order Workflow

    Hi Sourav,

    No PO wont be created manually we are just doing inbound integration to SAP , in that if the PO gets successfully uploaded to SAP then in that case we are making the PO automatically as Approve but the approve button will also be available so as to not show the Approve button as PO will be in approved status already ,I want to make it visible false

    Through config its not possible as it is giving error also extension for its Workflow Approval is not available.

    Can we do it through code , I can see generic classes are there so don't know how to achieve it.

    Please suggest

  • Martin Dráb Profile Picture
    236,353 Most Valuable Professional on at
    RE: How to disable the Approve button on Purchase Order Workflow

    I'm sorry, but I still didn't get it. What's the point of asking a user to approve and then trying to disable it, if "are making the PO automatically as Approve"?

  • Sarika laroia Profile Picture
    2 on at
    RE: How to disable the Approve button on Purchase Order Workflow

    Yes we dont want the user to approve so want to hide it as we want other menu buttons to be available on workflow so that user can take actions like delegate or recall etc

    Is there a way to code for it anyhow ??

    On form level its just two buttons as PromotedActionButton1 and PromotedActionButton2 (PurchTableWorkflowDropDialog)

    And in Generic class WorkflowDropDialog ,its updating controls and changing caption for these two buttons accordingly.

    Please let me know if it can be done through code or anyother way (I have checked using workflow config and disabling the approve from PurchTableApproval but for this extension itself is not available)

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#1
Community Member Profile Picture

Community Member 4

#3
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans