Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

<FormStateRule> (RibbonDiffXml)

Applies To: CRM 2015 on-prem, CRM Online

Specifies a rule that can detect the state of the form.

<FormStateRule 
 Default=["0" | "1" | "true" | "false"] 
 InvertResult=["0" | "1" | "true" | "false"] 
 State=["Create" | "Existing" | "ReadOnly"  | "Disabled"  | "BulkEdit"]
/>

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

InvertResult

Negates the return value of the rule.

Boolean

Optional

State

Describes the type of form. These correspond to the values returned by the Xrm.Page.ui (client-side reference).getFormType method.

Valid values:

 

Value Description

Create

Used before a record is saved.

Existing

Used after a record is saved and the user has access to edit it.

ReadOnly

Used to display a record that the user cannot edit.

Disabled

Used when the record is inactive and cannot be edited.

BulkEdit

Used when many records are updated at once.

Enumeration

Required

Child Elements

This element has no child elements.

Parent Elements

 

Element Description

<DisplayRule> (RibbonDiffXml)

Specifies either the definition of a rule used to display a ribbon element or a reference to a DisplayRule from a command definition.

<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/DisplayRules/DisplayRule/FormStateRule |
//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/FormStateRule |
//RibbonDiffXml/RuleDefinitions/DisplayRules/DisplayRule/OrRule/Or/FormStateRule |
//RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/OrRule/Or/FormStateRule

Schema Name

FormStateRuleType

Validation File

RibbonTypes.xsd

Can be Empty

Yes

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