Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
AnimationRule
File Suffix and Directory Location
AnimationRule components have the suffix animationRule and are stored in the animationRules folder.
Version
AnimationRule components are available in API version 46.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| animationFrequency | picklist | Required. The frequency with which an animation is displayed when a user
selects the designated picklist values in a path. Valid values are:
|
| developerName | string | Required. The developer name for the animation rule. |
| isActive | boolean | Required. Indicates whether the animation rule is active (true) or not (false). |
| masterLabel | string | Required. The label for the animation rule. |
| recordTypeContext | picklist | Required. An enum to track whether this AnimationRule applies to all record types for the associated sObject, or only to a single or main record type. Valid values are All, Master, or Custom. |
| recordTypeName | reference | The record type selected for the sObject in which the animation is displayed. |
| sobjectType | string | The object on which the animation rule is run. |
| targetField | string | Required. Name of the field used to determine when to display an animation. |
| targetFieldChangeToValues | string | Required. Values used to determine when to display an animation. When a user selects a value in targetField that matches a value stored in targetFieldChangeToValues, the animation is displayed. |
Declarative Metadata Sample Definition
The following is an example of an AnimationRule component.
1<?xml version="1.0" encoding="UTF-8"?>
2<AnimationRule xmlns="http://soap.sforce.com/2006/04/metadata">
3 <animationFrequency>Always</animationFrequency>
4 <developerName>AnimationRule_DeveloperName</developerName>
5 <isActive>true</isActive>
6 <masterLabel>AnimationRule Label</masterLabel>
7 <recordTypeContext>All</recordTypeContext>
8 <recordTypeName>__MASTER__</recordTypeName>
9 <sobjectType>Opportunity</sobjectType>
10 <targetField>StageName</targetField>
11 <targetFieldChangeToValues>Delivered, Negotiating, Closed Won</targetFieldChangeToValues>
12</AnimationRule>The following is an example package.xml that references the AnimationRule component.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>PathAssistant</members>
5 <name>Settings</name>
6 </types>
7 <types>
8 <members>AnimationRule_Developer_Name</members>
9 <name>AnimationRule</name>
10 </types>
11 <version>46.0</version>
12</Package>Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.