Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

<EntityRule> (RibbonDiffXml)

Applies To: CRM 2015 on-prem, CRM Online

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

<EntityRule 
 AppliesTo=["PrimaryEntity" | "SelectedEntity"]
 Context=["Form" | "HomePageGrid" | "SubGridStandard" |"SubGridAssociated"]
 Default=["0" | "1" | "true" | "false"]
 EntityName="String" 
 InvertResult=["0" | "1" | "true" | "false"]
/>

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

Attributes

 

Attribute Description Type Usage

AppliesTo

Determines whether the rule applies to the entity record being displayed in the form or entity records being displayed in a sub-grid.

Valid values:

 

Value Description

PrimaryEntity

For a form or Subgrid ribbon, the rule applies to the entity displayed in the form. This will option does not apply for a Grid Ribbon.

SelectedEntity

For a Grid or Subgrid ribbon this rule applies to the entity that appears in the grid.

Enumeration

Optional

Context

Specifies the context of the ribbon.

Valid values:

 

Value Description

Form

For the form ribbon.

HomePageGrid

For the ribbon that is displayed for the list of records that appear in the main application navigation pane.

SubGridStandard

For the ribbon that is displayed for the list of records that appear in a subgrid in a form.

SubGridAssociated

For the ribbon that is displayed for the list of records that appear in the navigation area of a form.

String

Optional

Default

Sets the default return value for the rule if the actual value cannot be determined.

This attribute is not valid when this element is a child of <TabDisplayRule> (RibbonDiffXml)

Boolean

Optional

EntityName

Specifies the entity that this rule will apply to. Use the entity logical name, for example, "new_customentity".

String

Required

InvertResult

Negates the return value of the rule.

This attribute is not valid when this element is a child of <TabDisplayRule> (RibbonDiffXml)

Boolean

Optional

Child Elements

This element has no child elements.

Parent Elements

 

Element Description

<TabDisplayRule> (RibbonDiffXml)

Specifies conditions when a tab will display.

<DisplayRule> (RibbonDiffXml)

Specifies either the definition of a rule used to display a ribbon element or a reference to a DisplayRule from a command definition.

<EnableRule> (RibbonDiffXml)

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.

<Or> (RibbonDiffXml)

Specifies a set of rules that must be evaluated together.

The InvertResult and Default attributes are not valid when this element is a child of <TabDisplayRule> (RibbonDiffXml)

 

XPath

//RibbonDiffXml/RuleDefinitions/TabSelectionRules/TabSelectionRule/EntityRule |
//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/EntityRule |
//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/EntityRule |
//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/OrRule/Or/EntityRule |
//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/OrRule/Or/EntityRule

Schema Name

EntityRuleType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.
Show:
© 2015 Microsoft