Tue, 03/30/2021 - 10:55 By Nguyen Thanh Khoi

Global ribbon Customization in Dynamics 365

Global Ribbon Buttons are the buttons that display on top-right corner of Dynamics Interface and on whatever entity form. Some OOTB global button are: Advanced Find, Search, Task Flow, Assistant,... This trick will show you how to customize Global button.

Global ribbon Customization in Dynamics 365

First, we should create a light solution for ribbon customization then add "Application Ribbons" component. We should only add needed component to this solution so it will be faster when we load solution as well as publish in Ribbon Workbench.

Add Application Ribbon component to solution

Then, Open tool Ribbon Workbench in XrmToolBox then load the created solution. In my case, this is solution named "ribbon". To have more information on Ribbon Workbench check this tricks.

Load solution in Ribbon Workbench

Every thing related customization of global button such as: show/hide button, change behavior, create/remove button,... will display at group Mscm.GlobalTab. To find this group, slide scrollbar of Home section to find the group to the right.

Global ribbon Customization in Dynamics 365

Drop a new button into Mscm.GlobalTab group area.

Global ribbon Customization in Dynamics 365

Next, customize your ribbon as you want. Here I will implement a global button that will call a JavaScript action whenever it is clicked so I add a new command then add JavaScript action to command.

Call JavaScript action from command

The snip code of function RibbonAction:

static RibbonAction(formContext)
{
    alert("Hello");
}

Finally, we publish the ribbon customization to Dynamics 365. If your solution has a lot of components, the publishing will take long time and in some case, it could get the error so the "best practice" is create a new solution only for Ribbon customization purpose and just add the needed thing to the solution.

Note: you need reload the latest resource by pressing Ctrl+F5 to view the change after you publish solution.

Here is the result: The new button will display next to the setting icon and JavaScript action is executed when click the button

Global ribbon Customization in Dynamics 365

If you have any thing want to discuss, please add a comment :)

Global ribbon Customization in Dynamics 365

Add new comment

Image CAPTCHA
Enter the characters shown in the image.