how to add a global button in Dynamics 365

https://dynamics-chronicles.com/article/global-ribbon-customization-dynamics-365

在这里插入图片描述

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

微软Dynamics 365/Power Apps培训:www.microsoft-dynamics365.com

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值