<ValueRule> (RibbonDiffXml)

应用到: CRM 2016 on-prem, CRM Online

一项用于检测特定字段的值的规则。

语法

<ValueRule 
 Default=["0" | "1" | "true" | "false"]
 Field="String" 
 InvertResult=["0" | "1" | "true" | "false"]
 Value="String" 
 />

属性和元素

The following describes the attributes, child elements, and parent elements.

属性

Attribute Description Type Usage

Default

如果无法确定实际值,则设置规则的默认返回值。

Boolean

Optional

Field

The name of the form attribute to check.

String

Required

InvertResult

对此规则的返回值求反。

Boolean

Optional

Value

指定要作为参数传递的值。

String

Required

子元素

此元素没有子元素。

父元素

Element Description

<DisplayRule> (RibbonDiffXml)

指定用于显示功能区元素的规则定义或指定对命令定义中的 DisplayRule 的引用。

<EnableRule> (RibbonDiffXml)

指定用于启用或禁用功能区元素的规则定义或指定对命令定义中的 EnableRule 的引用。

<Or> (RibbonDiffXml)

指定一组必须一起评估的规则。

备注

For commands defined for subgrid for forms using the updated user experience, value rules cannot be used within display rules. Use this element within an <EnableRule> (RibbonDiffXml) to hide an element.

元素信息

XPath

//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/ValueRule |
//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/ValueRule |
//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/OrRule/Or/ValueRule |
//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/ValueRule

Schema Name

ValueRuleType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

另请参阅

其他资源

Ribbon XML reference
自定义命令和功能区

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