Ribbon Customization Part-10-Hide ‘Add Existing’ button in Dynamics CRM 2011

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

  1. Create a Solution ‘Add Contact entity
  2. Export the solution
  3. Unzip and Edit the Customizations.xml file
  4. 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)
  5. I found the ids as shown  below from the contactribbon.xml
  6. ContactRibbon
  7. Add  the below code  in the RibbonDiffXML
  8.    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>

  9. Save it, Zip it and Import the Solution
  10. Refresh the browser the screenshot looks like below
  11. Hide Add Exisitng Buttons
  12. Download the entire solution from here.

Dynamics CRM 2011 Ribbon Customization Index

Here I am listing the index for my posts For Ribbon Customization

Topic Link
Understanding the CRM 2011 Ribbon
http://dynamicscrm2011.wordpress.com/2011/04/05/ribbon-customization/
Adding a Custom Tab to the CRM 2011 ribbon ( for HomePageGrid., and this will display for all the entities—like a Custom ISV Tab)
http://dynamicscrm2011.wordpress.com/2011/04/12/ms-dynamics-crm-2011-ribbon-customization-part-i-add-a-custom-tab-to-microsoft-dynamics-crm-2011-ribbon/

Understanding the Ribbon Customization-Schemas of the Ribbon http://dynamicscrm2011.wordpress.com/2011/04/12/ms-dynamics-crm-2011-ribbon-customization-part-2-understanding-the-ribbon-customization/
Adding a Custom Tab to the Specific Entity ( i.e for opportunity entity) http://dynamicscrm2011.wordpress.com/2011/04/13/ribbon-customization-part-3-add-a-custom-tab-to-a-specific-entityopportunity-entity/
Adding a Custom Tab, Custom Group,Button to the Grid Ribbon of a specific entity (i.e for Opportunity Entity) http://dynamicscrm2011.wordpress.com/2011/04/27/ribbon-customization-part-4-add-a-custom-tab-custom-group-and-custom-buttons-to-a-specific-entityopportunity-entity/
Adding a Custom Tab, Custom Group,Button to the Form Ribbon and SubGrid Ribbon of a specific entity (i.e for Opportunity Entity) http://dynamicscrm2011.wordpress.com/2011/04/27/ribbon-customization-part-5-add-a-custom-tab-custom-group-and-custom-buttons-to-a-form-ribbon-for-a-specific-entityopportunity-entity/
Adding a  Custom Group,Button to the existing tab of a specific entity (i.e for Opportunity Entity) http://dynamicscrm2011.wordpress.com/2011/04/28/ribbon-customization-part-6-add-a-custom-group-and-custom-buttons-to-existing-tab-for-a-specific-entityopportunity-entity/
Hiding a Ribbon Button in CRM 2011 http://dynamicscrm2011.wordpress.com/2011/04/28/ribbon-customization-part-7-hiding-a-ribbon-button-in-dynamics-crm-2011/
Hiding a Group of Ribbon Buttons in CRM 2011 http://dynamicscrm2011.wordpress.com/2011/04/29/ribbon-customization-part-8-hiding-a-group-of-ribbon-buttons-in-dynamics-crm-2011/
Adding a Button to Existing Group for custom entity’s Ribbon in Dynamics CRM 2011 http://dynamicscrm2011.wordpress.com/2011/05/02/ribbon-customization-part-9-adding-a-button-to-existing-group-for-custom-entitys-ribbon-in-dynamics-crm-2011/
   
   
   
   
   
   
   
   
   

Ribbon Customization Part-8-Hiding a Group of Ribbon Buttons in Dynamics CRM 2011

In my earlier post we have seen how to hide a ribbon button , In this post we will see how to hide the  group of buttons in the Ribbon

Now we will try to hide the “Actions”group in the Opportunity entity ribbon. see the below screenshot  which displays the Ribbon on the opportunity entity

ExistingRibbonOnOpportunityEntity

We are going to hide the entire “Actions” group

Steps to Follow

  1. We need to find the Id of the Ribbon component i.t “Actions”Group
  2. We need to open the “opportunityribbon.xml” which will be available at   “sdk\samplecode\cs\client\ribbon\exportribbonxml” 
  3. Open the “Opportuniyribbon.xml” find the “Actions”Group id as shown in the below screenshot
  4. finding the GroupId in Opprotunityribbonxml
  5. Now we need to create a new Solution
  6. Add the Opportunity Entity
  7. Save  and export the Solution
  8. Unzip the Solution
  9. Edit the “Customizations.xml”
  10. Go to the <<RibbonDiffXML>>
  11. Add the below  <<HideAction>> under the<<CustomActions>>under the <<RibbonDiffXML>>
  12.    1: <!-- to hide the Actions Group on the HomepageGrid Ribbon -->

       2:          <HideCustomAction Location="Mscrm.HomepageGrid.opportunity.MainTab.Actions" 

       3:                            HideActionId="Mscrm.HomepageGrid.opportunity.MainTab.Actions.HideAction" />

       4:          <!-- to hide the Actions Group on the Entity Form Ribbon -->

       5:                                     

       6:          <HideCustomAction Location="Mscrm.Form.opportunity.MainTab.Actions" 

       7:                            HideActionId="Mscrm.Form.opportunity.MainTab.Actions.HideAction" />

  13. Save  the File
  14. ReZip
  15. Import and Publish the Solution
  16. Refresh the Browser and you can see the Opportunity Entity ribbon looks like the below screenshot
  17. Hiding a Group of buttons in CRM2011 Ribbon
  18. That’s it for now.. Happy learning Smile
  19. Download the Complete Solution from here

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
Follow

Get every new post delivered to your Inbox.

Join 36 other followers