<DisplayRule> (RibbonDiffXml)

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

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

注意

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

語法

<CommandDefinition>
 <DisplayRules>
  <DisplayRule
   Id="String"
  />
 </DisplayRules>
</CommandDefinition>
<RuleDefinitions>
 <DisplayRules>
  <DisplayRule 
   Id="String">
   <CommandClientTypeRule />
   <CrmClientTypeRule />
   <CrmOfflineAccessStateRule />
   <CrmOutlookClientTypeRule />
   <CrmOutlookClientVersionRule />
   <EntityPrivilegeRule />
   <EntityPropertyRule />
   <EntityRule />
   <FormEntityContextRule />
   <FormStateRule />
   <FormTypeRule />
   <HideForTabletExperienceRule />
   <MiscellaneousPrivilegeRule />   <OptionSetRule />
   <OrganizationSettingRule />
   <OrRule />
   <OutlookRenderTypeRule />
   <OutlookVersionRule />
   <PageRule />
   <ReferencingAttributeRequiredRule />
   <RelationshipTypeRule />
   <SkuRule />
   <ValueRule />
  </DisplayRule>
 </DisplayRules>
</RuleDefinitions>

屬性和元素

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

屬性

Attribute Description Type Usage

Id

Either:

  • A unique identifier for the definition of a Display Rule

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

String

Required

子元素

Element Description

<CommandClientTypeRule> (RibbonDiffXml)

指定可偵測所使用之簡報類型的規則。

<CrmClientTypeRule> (RibbonDiffXml)

指定可偵測 Microsoft Dynamics CRM 用戶端類型的規則。

<CrmOutlookClientTypeRule> (RibbonDiffXml)

指定可偵測 Microsoft Dynamics CRM for Microsoft Office Outlook 用戶端類型的規則。

<CrmOfflineAccessStateRule> (RibbonDiffXml)

指定可偵測 Microsoft Dynamics CRM for Outlook with Offline Access 目前是否以離線模式操作的規則。

<EntityPrivilegeRule> (RibbonDiffXml)

指定可偵測目前使用者對特定實體之權限的規則。

<EntityPropertyRule> (RibbonDiffXml)

指定可偵測特定布林實體屬性的規則。

<EntityRule> (RibbonDiffXml)

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

<FormEntityContextRule> (RibbonDiffXml)

指定可偵測在特定實體內容中是否顯示表單功能區的規則。

<FormStateRule> (RibbonDiffXml)

指定可偵測表單狀態的規則。

<FormTypeRule> (RibbonDiffXml)

指定可偵測 Microsoft Dynamics CRM 表單類型的規則。

<HideForTabletExperienceRule> (RibbonDiffXml)

指定規則,要在平板裝置上的行動瀏覽器檢視 Web 應用程式時傳回 false。

<MiscellaneousPrivilegeRule> (RibbonDiffXml)

指定可偵測使用者是否擁有特定 Microsoft Dynamics CRM 權限的規則。

<OptionSetRule> (RibbonDiffXml)

僅供內部使用。

<OrganizationSettingRule> (RibbonDiffXml)

規則,可偵測 DisplayRule 內的兩個特定組織設定。

<OrRule> (RibbonDiffXml)

包含規則集合的規則,因此如果集合中的任何一個規則評估為 true,此規則就會評估為 true。

<OutlookRenderTypeRule> (RibbonDiffXml)

規則,可偵測表單或清單項目以網頁方式或在 Outlook 原生呈現,以決定是否應該顯示功能區元素。

<OutlookVersionRule> (RibbonDiffXml)

偵測 Microsoft Office Outlook 用戶端版本的規則。

<PageRule> (RibbonDiffXml)

規則,評估目前頁面的位址。

<ReferencingAttributeRequiredRule> (RibbonDiffXml)

規則,偵測是否需要實體的參照屬性。

<RelationshipTypeRule> (RibbonDiffXml)

規則,偵測兩個實體之間是否有特定類型的形式實體關聯。

<SkuRule> (RibbonDiffXml)

偵測 Microsoft Dynamics CRM 版本的規則。

<ValueRule> (RibbonDiffXml)

規則,偵測特定欄位的值。

上層元素

Element Description

<DisplayRules> (RibbonDiffXml)

包含顯示規則的集合。

備註

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

元素資訊

XPath

//RibbonDiffXml/CommandDefinitions/CommandDefinition/DisplayRules/DisplayRule |
//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule

Schema Name

  • DisplayRulesType/DisplayRule

  • ReferenceDisplayRuleType

Validation File

RibbonTypes.xsd

Can be Empty

When a grandchild of <CommandDefinition> (RibbonDiffXml)

請參閱

其他資源

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.