Ribbon Workbench: Show and Hide Buttons by Field Value
You can use Ribbon Workbench to show or hide the buttons.
However, if you simply want to hide unnecessary buttons, you can do so by adjusting the permissions in the security role.
So this time, we will add a setting to show or hide the field depending on its value.
advance preparation
Before doing any customization, do some advance preparation.
Importing Ribbon Workbench
Ribbon Workbench can be downloaded from RIBBON WORKBENCH.
Once you have registered your e-mail address for the download, you can download it from the link provided in the e-mail. *The detailed procedure is omitted.
Quote from: RIBBON WORKBENCH
Import the Ribbon Workbench that you downloaded from the Dynamics 365 solution.
If the import is complete, you will see something like this at the top
Create two option set fields
Create one custom field to show or hide the button depending on the value of Yes or No. We will create one custom field.
Place the fields on the sales case form.
Create a solution for button customization
Create a solution that contains the minimum necessary information about the entity for which you want to customize the button.
Ribbon Workbench is a fairly heavy solution.
If you include too many entities in your button customization solution
Care should be taken when implementing this in a production environment, as the entire service will be degraded when it is published.
In this case, we have created a solution that includes only one form for sales projects.
- Select sales proposals from existing entities
- With Add all assets unchecked
- I have selected only the sales proposal form and marked it complete.
- Required components are not included.
The solution we created is as follows
Load the solution
Now, load the solution that you just created in Ribbon Workbench.
Click the button at the top of the previous page.
Then, select the solution you have just chosen and click OK.
Once loaded, you will see the following screen.
There are separate areas for Home (buttons on the home screen), Subgrid (buttons on the subgrid screen), and Form (buttons on the form screen). In Entity, you can set which entity’s buttons to customize.
*Tip: If you want to simply hide the button, use the You can right-click on the button and click Hide.
In this example, we will customize the Close button as an order.
You can find the internal name by entering developer mode with F12 and checking it. It’s MarkAsWon.
On the MarkAsWon button in the Form area, click Right-click and click Customize Command.
COMMANDS Click MarkAsWon under In the right panel, under Display Rules, click Add Display Rule.
Enter an appropriate name in Id.
In the Add Step, click Value Rule.
Enter the name of the field you created and enter true for Value. If you set the value to True or TRUE, it will not work correctly.
You can then publish it with the Publsih button.
Operation check ①
Now, let’s check the operation.
When I open one of my sales proposals and check the form, I do not see Close as Order.
Now we have changed the field to Yes (true) and saved it.
You can now see that the order is closed. It’s working well.
Take it one step further
Two option set fields would be simple enough.
If the forecast category (msdyn_forecastcategory) is set to “confirmed”, the
We will also try to customize it to show the close as an order.
The confirmed value is 100000003, right?
Add the Step to the Display Rules in the Ribbon Workbench.
Now we need to Publish.
Operation check ②
Now let’s check the operation.
The custom field from earlier is Yes, but the Close as Order is not shown.
Changed prediction category to “confirmed”.
Close as order is now displayed. It’s working well.
This is how to use Ribbon Workbench in a more in-depth way.
You can call JS in COMMANDS to execute the process, and
When you import a Smart Button, you can run the process with the click of a button, so that you can
I encourage you to try other ways to use it.