Thursday, July 14, 2011

How to hide tabs,groups,buttons,SplitButton, from the ribbon(main grid,form level) in MS CRM 2011

We may have requirement for hiding the tabs, groups or buttons or SplitButton from the ribbons(new concept in ms crm 2011) on main grid or else on form also it cna be on othe rgrids like the associated view etc.
maingrid looks like



form grid looks like

main thig to hide the ribbons is to get the id to be hidden.
to get it use the tool from “\sdk\samplecode\cs\client\ribbon\exportribbonxml" if you ahve installed. else you can get it from MS CRM 2011 SDK.
build that solution by using VS 2010. Run it. it will ask you the server url with port number, credentials and the Org name.
after that it will create the ribbonxml file into c:/user/ExportRibbonXML\ExportedRibbonXML folder. create this folder and give access to that folder. else it will give some access right error.
It will create the files like entitynameRibbon.xml.
Open that file to get the proper ID taht you want to hide.
Its bit tricky to get.
for main grid the part is
like that the form level grid xml will be

now take ids from the ribbonxml files.

Import the entities you want to customize the ribbon by creating a solution.
unzip it and open the customization.xml file.
search the CustomActions node under RibbonDiffXml node.
then put the following tag <HideCustomAction Location="ID.you.got.from the.above.observation" HideActionId="LOcation_values_Earlier.HideAction" />

Like this you can add the tab_id, group_id and also the button_ids and you can hide the things.

am tired. ;)

No comments:

Post a Comment