Ribbon Customization Part-10-Hide ‘Add Existing’ button in Dynamics CRM 2011
May 6, 2011 3 Comments
To day we will see how to hid the ‘Add existing’ button on the Contact Associated view on the Account Entity. (Hiding Add Existing button was a very popular requirement in CRM 4.0)
When you open an Account entity record and click on ‘Contacts’ in the left navigation bar of the entity. you can see’Add New Contact’ and ‘Add Existing Contact’ buttons. Today we will see how to hide them using the Ribbon Customization
Follow the bellow steps
- Create a Solution ‘Add Contact entity
- Export the solution
- Unzip and Edit the Customizations.xml file
- Now we need to fine the Id of the ‘Add Existing’,Add New’ Buttons For this I opened the ‘contactribbon.xml’ which is available under ..\\sdk\samplecode\cs\client\ribbon\exportribbonxml\exportedribbonxml( this location depends on the Sdk installation directory on the file system)
- I found the ids as shown below from the contactribbon.xml
- Add the below code in the RibbonDiffXML
- Save it, Zip it and Import the Solution
- Refresh the browser the screenshot looks like below
- Download the entire solution from here.
1: <CustomActions>
2: <HideCustomAction Location="Mscrm.SubGrid.contact.AddNewStandard" HideActionId="sample.Mscrm.SubGrid.contact.AddNewStandard.HideAction" />
3: <HideCustomAction Location="Mscrm.SubGrid.contact.AddExistingAssoc" HideActionId="sample.Mscrm.SubGrid.contact.AddExistingAssoc.HideAction" />
4: <HideCustomAction Location="Mscrm.SubGrid.contact.AddExistingStandard" HideActionId="sample.Mscrm.SubGrid.contact.AddExistingStandard.HideAction" />
5: </CustomActions>