<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 当前是否脱机运行。

<EntityPrivilegeRule> (RibbonDiffXml)

指定可用于检测当前用户对特定实体具有的权限的规则。

<EntityPropertyRule> (RibbonDiffXml)

指定可检测特定的 Boolean 实体属性的规则。

<EntityRule> (RibbonDiffXml)

指定一项可检测特定实体是否位于上下文中的规则。

<FormEntityContextRule> (RibbonDiffXml)

指定一项规则,该规则可检测窗体功能区是否显示在特定实体的上下文中。

<FormStateRule> (RibbonDiffXml)

指定可检测窗体状态的规则。

<FormTypeRule> (RibbonDiffXml)

指定用于检测 Microsoft Dynamics CRM 窗体类型的规则。

<HideForTabletExperienceRule> (RibbonDiffXml)

指定当在平板电脑设备上使用移动浏览器查看 Web 应用程序时,会返回错误的规则。

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