CRM 2011: Hide a button in a custom entity’s form ribbon

For all of you who wanted to know how to do this, here are the steps:

  1. Make sure the custom entity is part of the solution you want to export and modify
  2. Export the solution and edit the customizations.xml file
  3. In this file, each entity has its own <Entity> tag so you need to find the one that suits your needs (example: if your custom entity is called new_test, you should look for the node
    <Name LocalizedName="Test" OriginalName="Test">new_test</Name>

  4. In this node, you should see a sub-node starting with <RibbonDiffXml>, which is the node containing the ribbons elements for your particular entity
  5. In this new section, you should only modify the <CustomActions /> node, which is the node containing all the custom actions for the entity’s ribbon: add a new button, hide a button, change the behavior of a particular button, etc.
    1. Under <CustomActions>, place the following code if you want to hide the ‘Save as complete’ button
      <HideCustomAction HideActionId="CA_HideSaveAsComplete" Location="Mscrm.Form.new_test.SaveAsComplete" />

    2. Do not forget to close the <CustomActions> tag after it!
  6. The complete code should look like this:


            <HideCustomAction HideActionId="CA_HideSaveAsComplete" Location="Mscrm.Form.new_test.SaveAsComplete" />



            <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>


        <CommandDefinitions />


            <TabDisplayRules />

            <DisplayRules />

            <EnableRules />


        <LocLabels />


After having saved the modified customizations.xml file, compress all the solution files in a new ZIP package and import it back in Microsoft CRM.

Once the package has been published, you should “see” that the ‘Save as complete’ button has disappeared on your entity’s form Winking smile

3 thoughts on “CRM 2011: Hide a button in a custom entity’s form ribbon”

    1. Hello Damien,

      I don’t see the line of code, can you send it back please?
      You can also contact me through the contact form so I can send you my email address for discussing via email.

      Also: I speak French if you prefer 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *