<EnableRule> (RibbonDiffXml)

[Applies to: Microsoft Dynamics CRM 2011]

Specifies either the definition of a rule used to enable or disable a ribbon element or a reference to an EnableRule from a command definition.

The EnableRule element child elements are only valid when it is a grandchild of <RuleDefinitions> (RibbonDiffXml).

  <EnableRule Id="String" />
 <EnableRules >
   <CrmClientTypeRule />
   <CrmOfflineAccessStateRule />
   <CrmOutlookClientTypeRule />
   <CustomRule />
   <EntityRule />
   <FormStateRule />
   <OrRule />
   <OutlookItemTrackingRule />
   <OutlookVersionRule />
   <PageRule />
   <RecordPrivilegeRule />
   <SelectionCountRule />
   <SkuRule />
   <ValueRule />

The following table lists the attributes, child elements, and parent elements.



Attribute Description Type Usage



  • A unique identifier for the definition of an Enable Rule

  • A reference to the Id value of a definition of an Enable Rule.



Child Elements


Element Description

<CrmClientTypeRule> (RibbonDiffXml)

Specifies a rule that detects the type of Microsoft Dynamics CRM client.

<CrmOfflineAccessStateRule> (RibbonDiffXml)

Specifies a rule that can be used to detect whether Microsoft Dynamics CRM for Outlook with Offline Access is currently operating offline.

<CrmOutlookClientTypeRule> (RibbonDiffXml)

Specifies a rule that detects the type of Microsoft Dynamics CRM for Microsoft Office Outlook client.

<CustomRule> (RibbonDiffXml)

Specifies a rule used with an EnableRule definition that is composed of a reference to a function within a JavaScript library.

<EntityRule> (RibbonDiffXml)

Specifies a rule that can detect whether a specific entity is in context.

<FormStateRule> (RibbonDiffXml)

Specifies a rule that can detect the state of the form.

<OrRule> (RibbonDiffXml)

A rule that contains a collection of rules so that this rule will evaluate as true if any of the rules in the collection evaluates as true.

<OutlookItemTrackingRule> (RibbonDiffXml)

A rule that detects whether the item is enabled for items tracked in Microsoft Dynamics CRM in order to enable a ribbon element.

<OutlookVersionRule> (RibbonDiffXml)

A rule that detects the version of Microsoft Office Outlook client.

<PageRule> (RibbonDiffXml)

A rule that evaluates the address of the current page.

<RecordPrivilegeRule> (RibbonDiffXml)

A rule that detects a user’s privileges for a specific record in order to enable a ribbon element.

<SelectionCountRule> (RibbonDiffXml)

A rule that detects how many items in a grid are selected.

<SkuRule> (RibbonDiffXml)

A rule that detects the Microsoft Dynamics CRM edition.

<ValueRule> (RibbonDiffXml)

A rule that detects the value of a specific field.

Parent Elements


Element Description

<EnableRules> (RibbonDiffXml)

Contains a collection of enable rules.

The <EnableRules> (RibbonDiffXml) element is used as a child of <RuleDefinitions> (RibbonDiffXml) and <CommandDefinition> (RibbonDiffXml). When the EnableRule element is a grandchild of RuleDefinitions it defines a rule and supports a variety of child rule elements. When EnableRule is a grandchild of CommandDefinition, it simply references the EnableRule definition using the Id attribute.



//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule |

Schema Name

  • ReferenceEnableRulesType/EnableRule

  • EnableRulesType/EnableRule

Validation File


Can be Empty

When a grandchild of <CommandDefinition> (RibbonDiffXml).

Microsoft Dynamics CRM 2011
Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.

Community Additions