Export (0) Print
Expand All
Expand Minimize

<CustomRule> (RibbonDiffXml)

[Applies to: Microsoft Dynamics CRM 2011]

Specifies a rule used with an EnableRule definition that is composed of a reference to a function within a JavaScript library.

<CustomRule
 Default=["0" | "1" | "true" | "false"]
 FunctionName="String"
 InvertResult=["0" | "1" | "true" | "false"]
 Library="String" >
 <BoolParameter />
 <CrmParameter />
 <DecimalParameter />
 <StringParameter />
</CustomRule>

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

Attributes

 

Attribute Description Type Usage

Default

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

Boolean

Optional

FunctionName

The name of a JScript function located in the library designated by the Library attribute.

FunctionName must follow this naming convention:

  • The first character must be a letter, an underscore ("_") character, or a dollar ("$") symbol.

  • The remaining characters may be any combination of letters, underscore characters, dollar symbols, numbers or periods.

String

Required

InvertResult

Negates the return value of the rule.

Boolean

Optional

Library

The path to a .js file containing the function named in the FunctionName attribute.

String

Required

Child Elements

 

Element Description

<BoolParameter> (RibbonDiffXml)

Specifies a value with a Boolean data type that may be passed as a parameter.

<CrmParameter> (RibbonDiffXml)

Represents data retrieved from the Microsoft Dynamics CRM application that may be passed as a parameter.

<DecimalParameter> (RibbonDiffXml)

Specifies a value with a decimal data type that may be passed as a parameter.

<IntParameter> (RibbonDiffXml)

Specifies a value with an integer data type that may be passed as a parameter.

<StringParameter> (RibbonDiffXml)

Specifies a value with a string data type that may be passed as a parameter.

Parent Elements

 

Element Description

<EnableRule> (RibbonDiffXml)

Specifies either the definition of a rule used to enable or disable a ribbon element or a reference to an EnableRule from a command definition.

<Or> (RibbonDiffXml)

Specifies a set of rules that must be evaluated together.

 

XPath

//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/CustomRule |
//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/OrRule/Or/CustomRule

Schema Name

CustomRuleType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

Microsoft Dynamics CRM 2011
Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.

Community Additions

ADD
Show:
© 2014 Microsoft