How to resolve multiple RibbonRule with rule id error in Dynamics 365 CRM

By | July 24, 2019

Introduction

In this blog, we will learn how to resolve multiple RibbonRule with rule id error.

Previously, we received a client requirment to add a new button in Application ribbon which already had two buttons. It was necessary to perform some new funcionality which the client required. So we tried to add new ribbon button in application ribbon. However, while adding button in application ribbon we got the following error.

Ribbons import: FAILURE: Found more than one RibbonRule with rule id ikl.Form.ApplicationRibbon.DisplayShowHideCheckinBtnForm.EnableRule, rule type 1, entity, and parent RibbonCustomization ca4b0057-d77e-e911-a9c6-000d3a370947

RibbonRule

In order to add ribbon button we followed the below steps:

  1. Create one solution in Dynamics CRM with name ‘ApplicationRibbon_Original’ and add Application Ribbon as component and export that solution.
  2. Then add new button in custimization.xml in RibbonDiffXml (you can use the Ribbonwork bench for the same) and create new zip file with name ApplicationRibbon_updated.

However, we got same error in the following three scenarios;

  • When we tried to import the updated solution
  • When we tried to import same solution ‘ApplicationRibbon_Original’ without any modification, and

When we tried to publish ‘ApplicationRibbon_Original’ solution from Ribbon workbench

RibbonRule

Next, we removed the duplicate rule from RibbonDiffXml in customization.xml or we removed  duplicate rule using Ribbonwork bench, even then the same above error was displayed.

So, in order to resolve this issue we took the below steps:

  1. Extarct ‘ApplicationRibbon_Original’ solution and remove all buttons from application ribbon by putting below RibbonDiffXml in customization.xml and import the solution in Dynamics CRM.

<RibbonDiffXml>

<CustomActions />

 <Templates>

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

</Templates>

<CommandDefinitions />

<RuleDefinitions>

<TabDisplayRules />

<DisplayRules />

<EnableRules />

</RuleDefinitions>

<LocLabels />

</RibbonDiffXml>

When we export the solution then it is sucessfully imported. Thus, it removes all button from application ribbon.

  1. Next, open customization.xml file of ‘ApplicationRibbon_Updated’ solution and remove duplicate rule enable rule from RibbonDiffXml (you can use the Ribbonwork bench for the same). Then import the solution successfully to Dynamics 365 CRM, and see new button in Application ribbon.

Conclusion

In this way, you can easily resolve multiple ‘RibbonRule with rule id error’ and save your valuable time and effort.

Leave a Reply

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