<EntityRule> (RibbonDiffXml)

適用於: CRM 2015 on-prem, CRM Online

指定可偵測特定實體是否在內容中的規則。

語法

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

屬性

Attribute Description Type Usage

AppliesTo

決定規則套用至表單中顯示的實體記錄或子格中顯示的實體記錄。

Valid values:

 

Value Description

PrimaryEntity

對於表單或子格功能區,規則會套用至表單中顯示的實體。此選項不適用於方格功能區。

SelectedEntity

對於方格或子格功能區,此規則會套用至方格中顯示的實體。

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

設定當無法判斷實際值時,規則的預設傳回值。

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

Boolean

Optional

EntityName

指定此規則適用的實體。使用實體邏輯名稱,例如 "new_customentity"。

String

Required

InvertResult

變換規則傳回值的正負號。

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

Boolean

Optional

子元素

此元素沒有子元素。

上層元素

Element Description

<TabDisplayRule> (RibbonDiffXml)

指定將顯示索引標籤的條件。

<DisplayRule> (RibbonDiffXml)

指定用於顯示功能區元素或命令定義中 DisplayRule 參照的規則定義。

<EnableRule> (RibbonDiffXml)

指定用於啟用或停用功能區元素或命令定義中 EnableRule 參照的規則定義。

<Or> (RibbonDiffXml)

指定一組必須同時評估的規則。

備註

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

請參閱

其他資源

Ribbon XML reference
自訂命令和功能區

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