Command checker to debug ribbon buttons

By | May 23, 2022

Introduction:

Dynamics 365 CRM have added new features that are helpful for a developer to develop and deliver solutions to clients more quickly. The command checker is one of the features that is used to debug ribbon buttons. This is one of the best features because sometimes adding a button and getting it to work is more challenging work for the developer. When the ribbon button shows an error and does not show then it’s a time-consuming job for a developer to find the cause and resolve the issue. Now with the help of the command checker, the developer can debug the ribbon button customization and easily find the cause of the issue and find the resolution.

To enable the command checker you need to append &ribbondebug=true in the CRM URL. Copy the CRM URL from the browser and append the &ribbondebug=true and paste the URL in the browser.

The final CRM URL will look as shown below:

https://org90bc3d01.crm.dynamics.com/main.aspx?appid=a123f692-19c7-ec11-a7b6-000d3a36cee0&pagetype=entitylist&etn=account&ribbondebug=true

Once you paste the above CRM URL in the browser and hit ‘Enter’ then the command Checker button will start appearing on the Global Ribbon and Entities home page grid and entities form Ribbons.

ribbon buttons

Command checker button from entity home page grid ribbon:

When clicking on the Command checker button from the account home page grid ribbon the following window will open. In that window, it shows all OOB and custom ribbon buttons along with each ribbon button’s properties, and command properties (action, enable rule, display rule). Looking at any ribbon button properties we are able to identify and troubleshoot why the button is hidden because of which Enable rule/Display rule button is hidden. We can check the rule or if any custom rule with JavaScript then we can debug that function and easily able to find the cause of it and resolve it.

ribbon buttons

Also, we can get every ribbon button’s information so that anyone can get an idea about the ribbon button. In this way, anyone new to this ribbon button can easily get functionality, and if any issue arises then they can easily troubleshoot and resolve the issue.

There is a ‘Regenerate ribbon metadata’ button at the top so that it displays the latest ribbons.

ribbon buttons

When clicking on the button, it shows the below message and regenerates the metadata in the background.

ribbon buttons

Global command checker:

When clicking on the Command checker button, it displays the following window with all OOB ribbon buttons and any custom button that is added to the Global ribbon.

ribbon buttons

As we can see in the above screenshot, Team Chat button is hidden and we are able to see them due to which the display rule button is hidden.

Conclusion:

In this way, with the help of the command checker, the developer is able to easily troubleshoot and resolve ribbon button issues.

Kanban Board