https:\/\/myorg.crm.dynamics.com\/main.aspx?appid=c26d1c44-e7c0-4c72-9d6d-0e82768cb5bd&ribbondebug=true<\/a>).\u00a0 You\u2019ll see two new UI features light up.\u00a0 The first is a new button in the top right of the header which lets you inspect the global command bar<\/p>\n <\/p>\n
Next, each command bar contains a new \u201cCommand checker\u201d button.\u00a0 Note that this shows up at the end of the ribbon, so you may have to click the overflow flyout.<\/p>\n
<\/p>\n
Let\u2019s explore the experience upon clicking the button.\u00a0 For this example, we\u2019ll use the account edit form.\u00a0 The tool is overlaid on top of the page as seen below.<\/p>\n
<\/p>\n
On the left, the context and entity name are displayed above a tree of tabs, groups, flyouts, and buttons.\u00a0 On the right, the details of the currently selected button are shown.\u00a0 The tree is collapsible at any tab, group, and flyout level for a cleaner experience when desired.\u00a0 The tree contents reflect the current state of the inspected ribbon (of course, this is dependent on each solution layer installed).<\/p>\n
Buttons and flyouts in italicized grey are hidden, and those in black text are visible.\u00a0 Note a flyout will be hidden when all its children are hidden.\u00a0 Likewise, all children will be hidden when a flyout evaluates to hidden.<\/p>\n
Let\u2019s drill down into one of the buttons to see why it\u2019s hidden.\u00a0 We\u2019ll use the Mark Complete <\/strong>button as an example.\u00a0 Clicking on this button shows the following breakdown.<\/p>\n <\/p>\n
You can see the name of the button and other properties from the ribbon XML displayed on the right.\u00a0 Clicking on Command properties<\/strong> on the right pane header will show details on execution and rule evaluation.<\/p>\n <\/p>\n
You can quickly see that the Mscrm.PrimaryIsActivity<\/strong> display rule evaluated to false in this page load, and in model-apps ribbons, the button is hidden if any rule evaluates to false.\u00a0 Drilling down into the evaluation, you can see which rule was used to determine visibility.<\/p>\n <\/p>\n
The rule was an EntityPropertyRule <\/strong>which checks the IsActivity<\/strong> property of the PrimaryEntity<\/strong> (this being the entity used on the form).\u00a0 Since the account entity has an IsActivity<\/strong> property of false, the rule itself evaluates to false, and the button is hidden.\u00a0 This level of detail exists for all types of rules, namely the JavaScriptRule<\/strong>, which shows the exact function name and JS file used to determine visibility (example below).<\/p>\n <\/p>\n
This breakdown is intended to demystify the hiding and showing of buttons in any context, be it an edit form, subgrid, home page grid, or the global command bar.\u00a0 The tool will also show the method to be executed upon click, including function name and JS file.<\/p>\n
<\/p>\n
Let\u2019s next look at the solution layer drilldown.\u00a0 Within Command checker, you can view the solution layering, including diffing ability, for button, command, and rule definitions.\u00a0 We\u2019ll use the Save\u00a0<\/strong>button on the opportunity form as an example.\u00a0 In this example, Contoso has imported a rule to always show to the Save button, regardless of auto-save status.\u00a0 Let\u2019s click on the button, navigate to Command properties, open the Mscrm.IsAutoSaveDisable<\/strong> rule\u00a0and click View rule definition solution layers<\/strong>.<\/p>\n <\/strong><\/p>\nYou can see all solutions which contribute to this command definition with publisher, order, and entity context displayed.\u00a0 One common mystery of button visibility is when many solution layers add and remove rules, so it\u2019s hard to determine which are in the final set.\u00a0 Let\u2019s compare the custom and base solutions to see how a rule was modified.\u00a0 We\u2019ll select the two records.\u00a0 Then we\u2019ll hit Compare<\/strong>.<\/p>\n <\/p>\n
In this view, you can select any two solutions for button, command, or rule definition comparison.\u00a0 Here, we are comparing the top solution (ContosoCustomization) with the base solution (System).\u00a0 You can see that the top solution (on the right) has overridden the base rule definition and instead uses the alwaysEnabled function to return true, meaning the Mscrm.IsAutoSaveDisable\u00a0<\/strong>rule will always evaluate to true.\u00a0 This should help clarify how solution layering has impact on the final rule set.<\/p>\nFeedback<\/h1>\n We hope you\u2019ll take some time to try out this new diagnostics feature, whether investigating a user-facing issue or simply exploring the buttons and rules present in the system.<\/p>\n
Please help us improve the tool by providing feedback in our Power Apps community post<\/a>.<\/p>\nWhat\u2019s next<\/h1>\n We’re excited for you to try out Command Checker, and we’re already working on improvements to make it more useful:<\/p>\n
\nAllow Command Checker usage through a new privilege rather than URL parameter<\/li>\n Support for the HideCustomAction element<\/li>\n Visualize commands hidden server-side before they reach the client<\/li>\n Support for buttons hidden for reasons other than rule evaluation<\/li>\n Adding detection for common ribbon mistakes and show them as errors and warnings<\/li>\n Show lock icons for system solutions that are not modifiable<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"We\u2019re excited to announce a new feature adding transparency to model-driven app ribbons in Power Apps! Command Checker is an in-app tool designed to help users understand why buttons are hidden or shown and what command will run upon click.<\/p>\n","protected":false},"author":206,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","power-apps-category":[1549,1599,1664,1703],"power-apps-tag":[1600,1650],"coauthors":[2180],"class_list":["post-8824","power-apps","type-power-apps","status-publish","hentry","power-apps-category-building-power-apps","power-apps-category-dynamics-365","power-apps-category-uncategorized","power-apps-category-support","power-apps-tag-dynamics-365","power-apps-tag-model-driven-apps"],"yoast_head":"\n
Introducing Command Checker for model-app ribbons - Microsoft Power Platform Blog<\/title>\n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n