Customizing the Ribbon of a Custom Activity in Microsoft Dynamics CRM 2011 does not always provide the results you might expect. The reasons might be sound and logical, but there are inconsistencies between the web client and the Outlook client that need to be observed.

In this article I have not described how to actually perform ribbon customization either using a relevant tool (such as the CRM Visual Ribbon Editor or the Ribbon Workbench from Develop1) or by writing the Ribbon customization XML by hand. There are plenty of articles of this around on the internet already.

Custom Actions on Custom Activities

When you add a Custom Action to the ribbon for a Custom Activity you have to be aware that, in the web client, the ribbon displayed for the Custom Activity is the normal “Activities” ribbon and not your Custom Activities ribbon. The screen shot below shows the ribbon for a Custom Activity and you will notice that it is the same as the normal “Activities” ribbon.


Note that in my case, the Custom Activity in question is not set as “Display in Activity Menus” in the entity customization.


If you add a Custom Action to the ribbon for your Custom Activity it will not be shown in the web client. This is because it is not the Custom Activities ribbon that is shown, but instead the normal “Activities” Ribbon (entity name is “activitypointer”).

Custom Actions on Custom Activities – in Outlook

When you add a Custom Action to the ribbon for a Custom Activity and use the Outlook client, double ribbons will be displayed. Both the normal “Activities” ribbon and the Custom Activities ribbon will render.


This is obviously not the expected result. Consistency with the web client would definitely be the best, or really second-best if you continue reading the section "Which Ribbon is the correct one?” below.

So the problem here is divided in two:

  1. The results are inconsistent between the web client and the Outlook client
  2. The result in the Outlook client is not acceptable

Solution 1 – Use default activities ribbon

  1. Do not add the Custom Action to the Custom Activities ribbon but instead add it to the standard “Activities” ribbon (entity name here is “activitypointer”).
  2. Create an that enables the Custom Action only for your specific Custom Activity.

The result show in the web client:


However, note that this ribbon will be displayed exactly in the same way for all activity entities in the system, both system (e.g. email, task, appointment) and for all your Custom Activities.

In Outlook, the same ribbon is displayed, yay – we have consistency:


We do not want the Custom Action (“Test”) to be enabled or even displayed for any other entity than our Custom Activity entity. This is however not possible. We cannot set a or of the type , because the entity in question will always be “activitypointer” and not our Custom Activity entity.

What we can do is to create a small JavaScript-snippet that checks the entity name and returns either true or false, and that snippet can then be used in an by using the tag. However, since it is not possible to use in a (but please vote for this on Connect) we cannot hide the button completely. Confusing? Yep.

The JavaScript-snippet could look like this:

enableRule: function (SelectedEntityTypeName) {
        return (SelectedEntityTypeName == "xxxxxxx");
  • Pros: Consistency between Outlook and the web client
  • Cons: The button is shown (albeit disabled) on all other activities, and not only on your Custom Activity.

Solution 2 – Hide your Custom Activity ribbon

If the web client is not important for you, you can add for all ribbon actions on the default activities ribbon in your Custom Entity. This will render only the Custom Activity ribbon in Outlook, and not the normal “Activities” ribbon. Confusing? Yep…

  • Pros: It looks good and works the expected way in Outlook, both for you Custom Activity and for your default activities.
  • Cons: It does not work in the web client.

Is there a third solution?

I haven’t tried it but it might be possible to combine the two solutions, so that solution 1 is for web only and solution 2 for outlook only. This might be possible by using the tag.

By the way - which Ribbon is the correct one?

This actually is a good question. If you customize the ribbon of a Custom Activity, which ribbon should be displayed? The Custom Activities ribbon or the normal Activities ribbon? Should it be different depending on the customization setting “Display in Activity Menus”?

Personally I would like the following:

  • If “Display in Activity Menus” is yes: Always render the Activities ribbon, both in Outlook and in the web client.
  • If “Display in Activity Menus” is no: Always render only the Custom Activities ribbon, both in Outlook and in the web client.

But this kind of change to the product will not happen, so the only way to solve the problem is to use one of the solutions above.


It is not functionally supported to add Custom Actions to a Custom Activity and then placing the Custom Activity in you sitemap as a “normal entity”. This will result in that two ribbons are displayed simultaneously in Outlook when a Custom Action is added to the ribbon of a Custom Activity entity.

The solution is either to use the default Activities ribbon, and thus get your Custom Action on all activities both standard and custom, or to get the Custom Activity only on your entity but then also have inconsistency between web and outlook.