UiFormatSpecificationSet defines a conditional formatting ruleset for field instances on Dynamic Forms-enabled Lightning pages. It controls the style and visibility of the formatting, not access to the field or the visibility of the underlying field itself. The supported formatting type is ICON.
Each ruleset belongs to an object through sobjectType and identifies the formatted field through field. For example, a ruleset can specify Contact and Contact.Customer_Sentiment__c. The ruleset definition is separate from the Lightning page configuration that selects it; having the ruleset in an org does not demonstrate that a page uses it.
Key Elements
| Element | What the Element Controls |
|---|---|
sobjectType |
Required. The object associated with the ruleset, such as Contact. |
field |
Required. The object field to format, such as Contact.Customer_Sentiment__c. This is distinct from fields used in rule conditions. |
formatType |
Required at both the ruleset level and inside each contained rule. The supported value is ICON. |
uiFormatSpecifications |
The list of individual rules contained in the ruleset. These entries are not separately deployable components. |
formatProperties |
Required within each rule. A JSON-formatted string containing properties for the selected formatting type. Documented icon examples use icon and iconColor. |
order |
Required within each rule. An integer specifying the rule's position in evaluation order, not merely its display position. |
visibilityRule |
The conditions under which a rule's formatting appears. A true result displays the formatting; a false result does not. If null or omitted, the formatting displays by default. |
booleanFilter |
Advanced logic within visibilityRule that combines criteria, such as 1 AND 2. |
leftValue |
Required within each criterion. Identifies the field being evaluated, including expressions such as {!Record.Customer_Sentiment__c}. |
operator |
Required within each criterion. Supported strings are CONTAINS, EQUAL, NE, GT, GE, LE, and LT. Preserve their case. |
rightValue |
The comparison value within a criterion, such as Happy or 1000000. |
Behavior and Constraints
Each entry in uiFormatSpecifications supplies its formatting properties, formatting type, evaluation order, and optional visibility rule. Both the ruleset-level and rule-level formatType support ICON.
formatProperties stores JSON as a string. For example, {"icon":"happy_face","iconColor":"green"} describes an icon and its color. The documented examples also use neutral_face with gray, and sad_face with red. These examples are not defaults or an exhaustive list of supported property values.
Within visibilityRule, criteria contains the filters, and booleanFilter can combine them with expressions such as 1 AND 2. Each criterion compares the field identified by leftValue against rightValue using operator. The comparison operators include not equal (NE), greater than (GT), greater than or equal (GE), less than or equal (LE), and less than (LT).
Omitting visibilityRule does not disable a rule. Its formatting displays by default when that element is null. Conversely, a false condition suppresses the formatting, not the underlying field.
There are no additional access requirements specific to UiFormatSpecificationSet. Its intended presentation context remains a field instance on a Dynamic Forms-enabled Lightning page.
Deployment and Retrieval
In Metadata API format, components use the .uiFormatSpecificationSet suffix and reside in the uiFormatSpecificationSets folder. In package.xml, use UiFormatSpecificationSet as the type name and the ruleset's metadata name as the member, such as Sentiment_Score. The type also supports the * wildcard in the manifest.
The inherited fullName is the component's metadata identity. The required masterLabel is the label displayed in Setup; it is not a substitute for the metadata name in a manifest. Deploy the containing ruleset rather than treating its uiFormatSpecifications entries as independent components. See the Salesforce Metadata API reference for the component structure and manifest example.
A page's selection of a ruleset is separate from the ruleset's object and field associations. In a reported deployment, a FlexiPage field instance selected the ruleset through a fieldInstanceProperties entry whose name was conditionalFormatRuleset and whose value was the ruleset name, Key_Field.
Including that name in a UiFormatSpecificationSet manifest entry did not prevent the destination sandbox from rejecting it in that report. No confirmed cause or resolution was reported. This does not establish a required deployment sequence or a general platform defect.
Relationships
The formatted field and the fields used by conditions have different dependency roles. Changing a condition field can change when formatting appears even if the formatted field remains unchanged. Dependency checks therefore need to inspect nested criteria as well as the top-level field association.
References
-
CustomObject:sobjectTypeassociates the ruleset with its object. -
CustomField:fieldidentifies the formatted field;leftValue, nested underuiFormatSpecifications,visibilityRule, andcriteria, can reference a field used in a condition.
Referenced By
The following is a reported name-based page association, separate from the object and field element references above:
-
FlexiPage: a field instance'sfieldInstancePropertiesentry can select a ruleset by name, usingnameset toconditionalFormatRulesetandvalueset to the ruleset name.
Reported Issues
-
A destination sandbox reportedly rejected a ruleset name used by a Lightning page. In August 2025, a deployment rejected
Key_Fieldas an invalid Conditional Formatting value even though the manifest included that member underUiFormatSpecificationSet. The page used afieldInstancePropertiesentry namedconditionalFormatRuleset. No confirmed cause, workaround, or resolution was reported, so the incident does not establish that rulesets must be deployed before pages. Read the deployment report.
Common Questions
What metadata type deploys conditional field formatting?
Use UiFormatSpecificationSet for the conditional formatting ruleset. Its individual rules are contained in uiFormatSpecifications. The Lightning page's selection of that ruleset is a separate page configuration.
Where are UiFormatSpecificationSet files stored, and can I retrieve all rulesets?
Metadata API components are stored in uiFormatSpecificationSets with the .uiFormatSpecificationSet suffix. The type supports * in package.xml to select all members.
Why does formatting appear when visibilityRule is missing?
A null or omitted visibilityRule displays the formatting by default. To make formatting conditional, supply criteria that determine when it should appear.
Can UiFormatSpecificationSet hide a field or control field access?
No. It controls the style and visibility of conditional formatting. A false visibility rule suppresses the formatting, not the field itself, and the ruleset does not control field access.
Why is a ruleset rejected even though it is in package.xml?
An August 2025 report describes that outcome for a page referencing Key_Field, but no confirmed cause or resolution was reported. Manifest inclusion alone did not prevent that failure; the report does not prove a required deployment order.