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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How to hide the Generate PDF button in the Quote according with the Status in the Dynamics 365

(1) ShareShare
ReportReport
Posted on by 95

Today, when enabling PDF generation, all active Word document templates are made available for the respective entity, however this option is displayed and can be activated at any time in the process, but according to the customer's scenario, the quote PDF is only it could be generated and / or forwarded according to the status of the Quotation entity record (Active, or a Custom status of Approved).

Given this need, what would be your recommendation for the solution of this need.

I would like to emphasize that we have already tried to customize this condition through the features of the Workbench 2016 solution, common practice in consultancies, but the same rule did not work for the Generate PDF button, but it works for other native buttons, Deactivate and Create  or a customized button.

Supporting references used for solution testing:

Mastering Ribbon Workbench 2016 - Part 5 - Hiding buttons conditional to the form context

How to Hide Button in Ribbon Workbench with CRM Dynamics 365

I have the same question (0)
  • Sarah Daniel Beshay Profile Picture
    Microsoft Employee on at

    Hi Bruno,

    Thank you for sharing your question on communities.

    At the moment, the button Generate PDF is not customizable in the same way we customize other out of the box buttons, we do have a limitation there. The only way to hide the buttons that is provided on the documentation is to disable the functionality for the whole entity as described here:

    docs.microsoft.com/.../enable-pdf-generation-quote

    I'm not aware of other workarounds to perform this, but I will keep checking and updating the thread as soon as I find any.

    I suggest that you also would update the ideas website with your requirement:

    http://ideas.dynamics.com/

    Hope this helps

  • Suggested answer
    Bruno Andrade Profile Picture
    95 on at

    Hello people.

    After opening a case with the Microsoft support team we found a solution.

    When using the Workbench 2016 tool, some commands were not being displayed and therefore we had no vision of the true command to associate with the anable rule.

    During the explanation for the solution the Microsoft engineer Samuel Cavichioli presented me with some tips and tools to solve this case and now I would like to share with you:

    Command Checker

    At the end of the URL we must include the command "&ribbondebug=true" as shown in the image below:

    pastedimage1587069387495v4.png

    Note that the page will be updated and the Command Checker button will be displayed, so we can debug the commands associated with the buttons, solution layers and their respective rules:

    pastedimage1587069351190v2.png

    pastedimage1587069371496v3.png

    Note that the actual command for the Create PDF button is Mscrm.Form.quote.CreatePDF, this command was not visible in the Workbech 2016 tool. To solve this reported problem and edit the button's enable rules, the Microsoft engineer Samuel Cavichioli presented me with another tip.

    Sample: Export ribbon definitions

    According to the link below, I downloaded the Export Ribbon Definitions sample and extracted the environment definitions using Visual Studio, located the ribbon quote xml file, copied the original Command Mscrm.Form.quote.CreatePDF definition and pasted it into the definitions structure in the customization.xml file of the unmanaged solution that I created and exported to edit the ribbon according to the link below.

    I added the necessary rules according to my scenario and the links below, then I compressed (zipped) folder with the edited files and I imported the edited solution back into the source environment.

    Then just test if the applied rules are working through Command Checker according to the image below:

    pastedimage1587069776933v1.png

  • Suggested answer
    CU28070837-2 Profile Picture
    2 on at

    Hi Bruno,

    We had the same requirement and had implemented it using JS DOM Manipulation.

    Please find attached code which we used to have this successfully implemented.

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 59

#2
Manoj - ManoVerse Profile Picture

Manoj - ManoVerse 50 Super User 2026 Season 1

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 31 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans