Ribbon Customization Part-7-Hiding a Ribbon Button in Dynamics CRM 2011

In this Post we will see  how to hide the CRM 2011 ribbon button , for this  I will take opportunity Entity and try to Hide the “Send Direct Email”Button which appear on the Home page grid of the Opportunity entity.

Steps to Follow

  1. Create a New Solution  ,Add the Opportunity entity
  2. Save and Export the solution
  3. Unzip the solution and edit the “customizations.xml” using visual studio 2010
  4. Here we need to find the Id of the “Send Direct Email” Button for that I would open the “Opportunityribbon.xml” available in “\\sdk\samplecode\cs\client\ribbon\exportribbonxml\exportedribbonxml” (this location depends on where you downloaded the Dynamics CRM 2011 SDK)
  5. and I found the  Id of the button as “Mscrm.HomepageGrid.opportunity.SendDirectEmail”
  6. Add the below code to  hide the button under the <<CustomActions>> under the <<RibbonDiffXML>>
  7.    1: <HideCustomAction Location="Mscrm.HomepageGrid.opportunity.SendDirectEmail"

       2:                 HideActionId="Mscrm.HomepageGrid.opportunity.SendDirectEmail.HideAction" />   

  8. Save
  9. Rezip
  10. Import and publish
  11. Refresh the browser you can see the  the “Send Direct Email Button” won’t be displayed
  12. Down load the complete solution from here
Advertisements