Troubleshooting Ribbon Button Functionality for Model-Driven Apps

Troubleshooting Ribbon Button Functionality

Question

You create a new ribbon button for a model-driven app.

But it does not work as you expected.

You need to troubleshoot the button functionality.

What two steps should you take to achieve your goal?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E. F.

Correct Answers: C and F

Power Apps provides the Command Checker tool that helps you to troubleshoot the ribbon buttons.

The tool produces information about button visibility, actions, problems with rules.

You need to enable the Command Checker by adding the &ribbondebug=true to the app's URL (Number 1)

After that, you click on three vertical dots (Number 2) to open a menu and select the “Command checker” item (Number 3).

a ®&

Power Apps | Form

Components

~P Search

Layout

[Gi 1-column tab
2-column tab
3-column tab
[ 1-Column section
O0 2-Column section
(00 3-Column section

(ll 4-Column section

Input

Arc Knob

= Toggle
Linear Gauge

Number Input

= Flip - Switch
Star Rating
3] Radial Knob

2] Linear Slider
v Related data
©) Canvas app
BY Quick view

a Subgrid

AO re i

+ Form field + Component [8 Form settings Switch to classic

x

@ We've upgraded your form to show a high density header that displays more data. You can edit this setting in the properties of the header. Learn more

Environment

G (default)

Edit header density

New Account

Account

Summary _ Details

ACCOUNT INFORMATION

Account Name Bi ex

Phone ga

Business card reader

Modes
Edit and Read

Description

Use this Al Builder control to
automatically extract contact
information from images.

Data types
Text, Multiline Text

Address 1:
State/Province

Address 1: ZIP/Postal
Code

dress

Timeline

iz

Almost there

Annual Rever

CONTACTS

Country/Region

[I Desktop (1920 x 1080)

Save © [ Publish

Account >

Main form

Properties Events.

Table
Account

Display Name

Account

Description

Updated default Account form.

Max Width (pixels)

1,920

@ Show image 0)

When you create a new command button, you need to address two elements: rule and actions.

The rule defines when button's state within the application, like enable/disable state of the button when some field is changed or who can see the button.

There are two types of rules: enable (should the command button be enabled) and display (should the rule be visible for the users)

The action describes the button behavior, like what should happen when the button is clicked.

There are two types of command button actions that users can define in the OnClick event: execute the custom logic using JavaScript code or open a specific URL.

It can be the dynamic URL if the business logic of your app requires it.

Using the Command checker, you can “drill down” the command bar tree (Number 1) and select the button that you have a problem with (Number 2)

On the right side of the Command checker screen, you can select the Command properties of the button (Number 3).This tab presents the button's Actions, Enable Rules, and Display Rules.

You can verify why the button is hidden, like the Display Rule evaluated to false on a page load (Number 4).

Power Apps Northwind Orders (Model-drive}

EJ Show Chart

Home

All Orders v

VY Order Number

it
© Recent Vv
x

Pinned we
03900

New Group -_

[€2 orders
0902
0903
0904
0905
0906
0907
0908
0909
0910
0911
0912
0913
0914

0915

0916

All # A

1 - 39 of 39 (0 selected)

Command checker

Command Bar: HomePageGrid : nwind_orders @

HideCustomActions
~~ Tab Id: Mscrm.CommandBar
‘Group Id: Mscrm.HomepageGrid.nwind_orders.MainTab.Management
New
New (hidden) 6
Edit (hidden)
Activate (hidden)
Deactivate (hidden)
Open Active Stage (hidden)
Delete
Delete (hidden)
Switch between list/grid, editable grid and other controls (hidden)
~~ Group Id: Mscrm.HomepageGrid.nwind_orders.MainTab.ModernClient
Refresh
See all records (hidden)
‘Group Id: Mscrm.HomepageGrid.nwind_orders.MainTab.Collaborate
Send Direct Email (hidden)
Assign (hidden)
Share (hidden)
View Hierarchy (hidden)
~ Email a Link
Of Selected Items (hidden)
Of Current View (hidden)
Add to Queue (hidden)

~~ Group Id: Mserm.HomepageGrid.nwind_orders.MainTab.Workflow

Flow

Button - New 3)

Button properties Command properties

Mscrm.HomepageGrid.NewRecordForBPFEntity ©

View command definition solution layers

~ Actions ©
> JavaScriptFunction

Enable Rules ©

> Mscrm.lsValidForHierarchyView - True
> Mserm.[sValidForHierarchyPagelnUC - True

> Mscrm.lsEntityAvailableForUserlnMocaOffline - True
~ Display Rules ©

> Mscrm.lsPUV2EntityCustomizationEnabled - True

> Mscrm.IsBPFEntityCustomizationFeatureEnabled - True

™~ Mscrm.SelectedEntitylsBPFEntity - False
View rule definition solution layers @
> EntityPropertyRule - False

Mscrm.CreateSelectedEntityPermission - Skipped

All other options are incorrect.

For more information about the Command button rules and actions, please visit the below URLs:

Sure, I'll provide a detailed explanation of the steps you can take to troubleshoot the ribbon button functionality in a model-driven app.

Step 1: Check the Button Rule The first step you should take is to check the button rule. The button rule defines the conditions under which the button should be displayed and what action should be performed when the button is clicked. To check the button rule, follow these steps:

  1. Open the model-driven app where you have created the button.
  2. Navigate to the entity form where the button is placed.
  3. Click on the button to open the Command Designer.
  4. Check the button rule to ensure that it is correctly configured.

Step 2: Use the Ribbon Debugger If the button rule is correctly configured but the button is still not working as expected, the next step is to use the ribbon debugger. The ribbon debugger is a tool that helps you troubleshoot issues with ribbon buttons in model-driven apps. To use the ribbon debugger, follow these steps:

  1. Add &ribbondebug=true to the app's URL.
  2. Open the model-driven app where you have created the button.
  3. Navigate to the entity form where the button is placed.
  4. Click on the button to open the Command Designer.
  5. Check the console log for any errors related to the button.

If the ribbon debugger reveals any errors related to the button, you can use this information to fix the issue.

Other options listed in the answer choices are not relevant to troubleshoot the ribbon button functionality issue, they are:

  • Ribbon Workbench: This is a third-party tool used to customize the ribbon in Dynamics 365. It is not necessary to use Ribbon Workbench to troubleshoot issues with a single button.
  • App Checker: This tool is used to validate a model-driven app against a set of best practices and guidelines. It is not relevant to troubleshoot issues with a specific button.
  • &ribbonbench=true: This URL parameter is not a valid parameter to troubleshoot ribbon button issues.
  • Command Checker: This tool is used to validate a command bar or ribbon against a set of best practices and guidelines. It is not relevant to troubleshoot issues with a specific button.