Tue, 03/30/2021 - 10:55 By Nguyen Thanh Khoi Contributor Lloyd Sebag
4 comments

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

Comments

I want to launch a new window showing a custom entity from the global ribbon. That's fine and I have been able to do that but I need to understand the context of whatever happens to be showing on the screen at the time. For example what is the current contact record. If I pass CRM Parameter PrimaryControl or PrimaryControlId it is always null.
How can I determine what is showing in d365 at the time the button is pressed - is that possible?

Fri, 08/12/2022 - 11:02
sibur (not verified)

Hi Likewise i want to hide Assistance button after search on global command , however i can't find any relevant button in application ribbon

Thu, 03/30/2023 - 12:46
Prashant M (not verified)

Add new comment

Image CAPTCHA
Enter the characters shown in the image.