Learn how to use Conditional Field Formatting in Lightning App Builder to highlight critical fields (Cold, Warm, Hot) so users can spot important information at a glance.
Introduction
Conditional Field Formatting in Salesforce Lightning App Builder lets you add icons, colors, and text styles to fields on Dynamic Forms-enabled pages. This reduces cognitive load for users and surfaces critical information immediately — for example, showing a red warning icon for ‘Cold’ accounts and a green rocket for ‘Hot’ accounts.
Why use Conditional Field Formatting?
Traditional formula-based image fields required extra fields and maintenance of image URLs. Conditional Field Formatting simplifies this by applying visual rules directly to fields within Dynamic Forms or the Dynamic Highlight Panel.
Pre-requisites
- Dynamic Forms must be enabled and applied to the object page.
- Use a Dynamic Highlight Panel to apply conditional formatting in the highlights area.
- If you want indicators on mobile, enable Dynamic Forms on Mobile.
Business Use Case
Example: On the Account record, apply conditional formatting to the Rating field so it displays:
- Cold → Red Warning Triangle icon + text Cold
- Warm → Orange Smiling Face icon + text Warm
- Hot → Green Rocket icon + text Hot
Step-by-step: Configure Conditional Field Formatting
Step 1 — Create a Ruleset
- Go to Setup → Object Manager → Account → Lightning Record Pages.
- Edit the Lightning Record Page for Account.
- Click the Rating field in the Dynamic Highlight Panel and expand Conditional Formatting.
- Click Create Ruleset, give it a name, and click Next.
Step 2 — Define Formatting Rules
For each rule, choose icon and color, then set the condition.
- Example rule for Cold:
- Icon: Warning Triangle
- Icon Color: Red
- Condition: Rating equals Cold
- Repeat for Warm and Hot with appropriate icons and colors.
Step 3 — Save and Activate
- Click Save Ruleset.
- Activate the Lightning Record Page so all users see the changes.
Step 4 — Deleting a Ruleset
- Navigate to Setup → Object Manager → Account → Conditional Field Formatting.
- Find the Ruleset, use the dropdown to select Delete, and confirm.
Best Practices & Things to Remember
- Formatting can reference other fields and formulas — not just the target field.
- Only Salesforce’s predefined icons are available; custom icons are not supported.
- Each field can have one Ruleset containing multiple ordered rules — rules execute in order and stop at the first true rule.
- Rulesets must be added to Change Sets manually for deployment.
Conclusion — Why this matters
Conditional Field Formatting improves data visibility and speeds up decision-making by turning values into visual signals. For Salesforce admins and developers, it reduces the need for extra formula/image fields, lowers maintenance, and delivers a better UX. For business users, it surfaces priority information immediately, increasing productivity and reducing errors.
If you’re an admin or developer preparing pages for users, consider where visual cues will reduce clicks and speed outcomes — common areas are Account ratings, Case priority, opportunity stage, and overdue tasks.








Leave a Reply