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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Purchase order approval workflow (PurchTableTemplate) - how to disable the workflow submit dialog?

(0) ShareShare
ReportReport
Posted on by 1,650

Hello,

we are using the standard Microsoft puchase order approval workflow (PurchTableTemplate). My requirement is to turn of clicking two times on a "Submit" button when starting a purchase order approval workflow. Here is the current behaviour:

First the user submits the workflow in the purchase order form:

7607.PurchWorkflow01.jpg

After this automatically the "submit dialog" opens with the possibility to enter a comment and the user again has to close this with clicking the second time on a "submit" button:

8054.PurchWorkflow02.jpg

Is there a possibility how I can turn of / get rid of the second dialog with the comment (because our customer don't needs the comment)?

Thanks in advance for any hint.

Sebastian

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,573 Moderator on at

    Hi Sebastian, I think its not controlled by workflow configuration, so customization would be required. You can add breakpoint on init method of WorkflowWorkItemActionDialog form and debug to get more details.

    community.dynamics.com/.../x-how-to-get-workflow-submit-comments-mandatory-in-d365fo

  • Sebastian Aurand Profile Picture
    1,650 on at

    Thanks for the answer. I debugged the PurchTableWorkflow class which calls the dialog:

    PurchWorkflow03.jpg

    How could I achieve via code extension that the dialog does not open but the workflow is started?

    Sebastian

  • Suggested answer
    Mohit Rampal Profile Picture
    12,573 Moderator on at

    Hi Sebastian, One way is to create extension class and bypass standard condition. However, please note that its not recommended approach by Microsoft as any future updates on that method will be missing on your extended method and you have to manually copy it. (I tried re-factoring standard code and tested so not sure if it will work)

        public void  submit()
        {
            PurchTable purchTableLocal = purchTable; //mapping table buffer
            WorkflowSubmitDialog            workflowSubmitDialog;
            purchTable = null;
            
            next submit();
            purchTable = purchTableLocal;
    
            if (purchTable != null)
            {
                // Tax is needed to be calculated first or else the Accounting Distribution allocation factor will not be calculated correctly.
                PurchTotals::newPurchTable(purchTable).calc();
                  
                if (this.canSubmit(purchTable))
                {
                    purchTable.submitToWorkflow(workFlowTypeStr(PurchTableTemplate), workflowSubmitDialog.parmWorkflowComment(), false);
                }
            }
        }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 287

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 212 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 145 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans