Blog

Beringer Team Awarded by CRMSoftware Blog

Modify the Ribbon Buttons in CRM 2011

Modify the Ribbon Buttons in CRM 2011

Ever since CRM 2011 came out, we have received numerous requests from our customers to modify the out-of-the-box buttons in the ribbon, anything from changing the label to disabling buttons for users based on their role. While this can easily be achieved, it’s something that involves a good understanding of the ribbon definitions.

You cannot modify the ribbon directly, but you can define changes for any entity specific ribbon by exporting the entity and customizing the RibbonDiffXml definition within the customizations.xml file.

xml-1If you want to make a global change to the ribbon, you would instead export the applicationribbon.xml and modify its RibbonDiffXml definition. In order to make changes to an out-of-the-box button, you must first define it using the button definitions found in the SDK at sdkresourcesexportedribbonxml.

An xml file for the definitions is present for each out of the box entity as well as the applicationribbon. There can be multiple definitions per button (homepagegrid, form, subgrid), so it’s important to make sure you grab the appropriate button (or all of them) based on what you are trying to do.

 

You can then copy and paste the needed portion of the button definition in the RibbonDiffXml as a <CustomAction> to modify the properties of the button such as the image or label or you can define a <CommandDefinition> with an <EnableRule/> or <DisplayRule/> to execute based on <Actions> you define.

 

Your defined actions can either be written directly in the RibbonDiffXml if you are just checking the value of field(s) on the entity or by calling a function in a JavaScript web resource(for more complex conditions such as checking the logged in users role).xml-2

While this is just a brief overview of what customizing the ribbon entails, it gives some of you an idea of how the process works. More details about it can be found in the SDK.

Below is a list of a few customizations that we have implemented for our customers with:

  • Disabled buttons based on the logged in users security role (Example: The “Qualify” button on Lead can be disabled for users without administrative privileges)

 

  • Disabled buttons based on a value in a field (Example: Some of our customers have an approval process set up on entity’s such as Lead. The “Qualify” button can be disabled until a manager has indicated their approval of the Lead.)

 

  • Hid unused buttons to clean up the ribbon

 

  • Relabeled the buttons and their tooltips (Example: Our customers have often used the Case entity for their Projects. The entity is renamed to Projects, but the labels of buttons such as “Resolve Case” and “Cancel Case” do not change. By modifying the ribbon definition of the entity, the label and tooltips can be changed to reflect the new name of the entity).

 

If you have a ribbon request that you are struggling with or are looking for someone to customize your ribbon, please reach out to us.