Dela via


<RelationshipTypeRule> (RibbonDiffXml)

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

A rule that detects whether a specific type of formal entity relationship exists between two entities.

Syntax

<RelationshipTypeRule 
 AllowCustomRelationship=["0" | "1" | "true" | "false"]
 AllowSystemRelationship=["0" | "1" | "true" | "false"]
 AppliesTo="SelectedEntity" 
 Default=["0" | "1" | "true" | "false"]
 InvertResult=["0" | "1" | "true" | "false"]
 RelationshipType=["OneToMany" | "ManyToMany" | "NoRelationship"]
 />

Attributes and Elements

The following describes 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

SelectedEntity

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

Enumeration

Required

Default

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

Boolean

Optional

InvertResult

Negates the return value of the rule.

Boolean

Optional

RelationshipType

Describes the type of entity relationship to check.

Valid values:

Value

Description

OneToMany

In a 1:N (One-to-Many) entity relationship one entity has a lookup attribute that allows an entity object to store a reference to another entity object for a particular entity.

ManyToMany

A N:N (Many-To-Many) entity relationship allows for a formal entity relationship where each entity can display an associated view of another entity or even a self-referencing relationship. N:N relationships use an Intersect Entity that stores entity object ids so that they can be associated.

NoRelationship

There is no entity relationship defined between the entities.

Enumeration

Required

Child Elements

This element has no child elements.

Parent Elements

Element

Description

<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.

<Or> (RibbonDiffXml)

Specifies a set of rules that must be evaluated together.

Element Information

XPath

//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/RelationshipTypeRule |
//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/OrRule/Or/RelationshipTypeRule

Schema Name

RelationshipTypeRuleType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

See Also

Ribbon XML reference
Customize commands and the ribbon

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright