Hiding Sub Grid buttons using Ribbon Workbench customization in Dynamics 365.

 Hello Guys

In my previous blog we have seen how you can open a record from the sub grid in a pop-up window.Today we will see how we can hide buttons of the sub grid using Ribbon Workbench customization. But before if you are new to our blog then do follow us to know more about Dynamics and Power Platform. Also if you like our blog then please comment and share this blog with your friends.

We will be using same sub grid example which we have worked on my previous blog. If you have not read it then you can read it from here.



As you can see in above image, we have one employee sub-grid and it contains "New Employee" button which means you can create a new employee by clicking on that button. There are some scenario where we don't want this button visible on sub-grid. In this situation we can hide it with the help of Ribbon Workbench.

You can download Ribbon Workbench solution by navigating here. Once it will be downloaded, import the solution in your CRM. Once it will be installed you can verify it from here. It will be visible in your Customization.


Click on Ribbon Workbench. It will open a new window as below:



Select solution which contains your target entity where you want to work. For example here we have to hide buttons on sub-grid of employee entity. So i have created one solution named blogger and kept the entity in this solution. Once your solution will be downloaded in workbench, it will look like this:


Now select the Employee Entity from the drop-down.Select sub-grid tab.



Now right click on the button which you want to hide. For example if you want to hide New button on sub-grid then right click on New button and select hide option. In the same way you can hide other buttons too.Do the same for Add New and Add Existing button too.



Once done, click on publish solution and click on OK.



Now refresh your entity where we have used Employee sub-grid. You will see New Employee button is now not available.



Here we have made the button hidden and now it will not be visible on sub-grid. Now consider a scenario where you want to use  sub-grid on other entity except department then here also these buttons will be hidden. But we want these buttons will be visible on some entity and on some entity they should be hidden. In this case we need to write custom JavaScript. We will see how we can write custom code for hiding buttons on sub-grid in future blogs.

But till the time please follow, like and share this blog if you like it.
Hope it helps...

 


Comments

Post a Comment

Popular posts from this blog

Creating Custom API in D365.

Read Only Sub Grid & Editable Sub grid in Dynamics 365

Using Polymorphic Lookups in D365.