1) Install Ribbon Workbench from here
2) Import solution in your Dynamics CRM 365 instance
3) A button "RIBBON WORKBENCH 2016" is created in Solution Page. Click on it
4) Now new window is opened. Select your desired solution containing entity to be customized. It is better to create a separate solution to be used for ribbon customization and contains only desired entity. In this scenario I have created a new solution "Ribbon Solution" contain only Case entity. Here I am selecting solution Ribbon Solution
5) Now solution is opened in ribbon workbench. Select your desired entity and on button right mouse click. Now select Customize Command. (In my case as button is already customized therefore this command is shown disabled)
6) Now in command section, select the generated command and click on Add Enable Rule. Now select Add New Enable Rule.
7) Now click on Add Step & select CustomRule. There are others rules to apply enable rules on button. Here I am only showing the CustomRule.
8) Give Javascript function & Javascript library webresource. You can also search Js webresource in ribbon workbench, see below image.
9) It is advised to use separate library for ribbon customization because some times Dynamics CRM lock the library containing enable rule functions when applied on default buttons. So the library do not show in developer tools. So this make impossible to debug / view the library in developer tools. To avoid not to lock the whole library containing other form logic & functions (Onload, Onsave), use separate library to be use for enable rules for default Dynamics CRM buttons.
10) Sample JavaScript function
function PhoneSupportEnableRule(){
var IsHide= true // Get your logic here
// may be this button set from API call
if(IsHide == true)
return true;
return false; }
var IsHide= true // Get your logic here
// may be this button set from API call
if(IsHide == true)
return true;
return false; }
㉺㉼㉴㉳㉽㉾㈕㈔㈆㈅㈄㈄㈃㈁㈀㉤
Ali Hamza Wadood
Microsoft Dynamics CRM Developer | Software Engineer - Microsoft Technologies(Asp.Net, Asp.Net MVC)