Last Updated on March 10, 2025 by Rakesh Gupta
Big Idea or Enduring Question:
Objectives:
After reading this blog, you’ll be able to:
- Understand Conditional Field Formatting in Salesforce.
- Configure a Dynamic Highlight Panel in Lightning App Builder.
- Apply rules to highlight key field values.
- Improve data visibility and user experience.
- Delete a Conditional Field Formatting.Â
Business Use case
Pre-requisites:
Before implementing Conditional Field Formatting, keep these important points in mind:
- Conditional Field Formatting is only available for fields enabled through Dynamic Forms.
- To use Conditional Field Formatting in the Highlights Panel, you must use a Dynamic Highlight Panel.
If you haven’t enabled Dynamic Forms or the Dynamic Highlight Panel, take a moment to complete the relevant Trailhead modules to set them up before proceeding.
If you’re using Salesforce Mobile and want these indicators to appear on mobile devices, you must enable Dynamic Forms on Mobile.Â
Traditional Method: Using Formula Fields
Previously, the standard way to display icons based on field values was through Formula Fields. This required creating a formula field that referenced an image formula, with images either stored in Static Resources or hosted externally on the web.
While this method worked, it involved extra effort – managing image URLs, maintaining formulas, and ensuring proper rendering – just to display a simple icon. Moreover, this approach required creating an additional field solely to meet a business requirement, adding unnecessary complexity for administrators and developers.
Modern Approach: Conditional Field Formatting
Conditional Field Formatting in Salesforce Lightning App Builder allows you to visually enhance fields on record pages based on specific conditions. You can apply icons, colors, and text styles to make important data stand out, improving readability and decision-making.
For example, instead of a plain Priority field on a Case record, you can use Conditional Field Formatting to display:
- 🟢 Green for Low priority
- 🟡 Yellow for Medium priority
- đź”´ Red for High priority
How Conditional Field Formatting Works
Conditional Field Formatting is available on Dynamic Forms-enabled pages and operates through rulesets – a collection of conditions that determine when and how formatting is applied to a field. These rulesets allow you to define specific criteria based on field values, formulas, or related records, ensuring that important information is visually distinct.
With this approach, users don’t need to rely on reading field values manually – instead, they can quickly interpret the status through visual cues, improving efficiency and decision-making.
Benefits of Conditional Field Formatting
Conditional Field Formatting makes key data stand out, ensuring users can quickly interpret and act on critical information. Here are the benefits:
- Better Data Visibility: Important information is easier to identify at a glance, reducing the need to search through records manually.
- Increased Productivity: Users can quickly assess key details without scanning multiple fields, allowing for faster decision-making and improved workflow efficiency.
- Flexible Customization:Â Formatting dynamically adapts based on field values, ensuring the most relevant information stands out when needed. Whether it’s highlighting urgent cases, flagging high-value opportunities, or marking overdue tasks, this feature provides a tailored, intuitive user experience.
Automation Champion Approach (I-do):
To address Emma’s business use case, we will use Conditional Field Formatting. Before proceeding, ensure that Dynamic Forms is enabled for the Account object, as this use case specifically applies to Account records.
Step 1: Create a Ruleset
In this step, we will create a ruleset for the Account Rating field in the Dynamic Highlight Panel. Follow the steps below to complete this process:
- Navigate to Setup | Object Manager | Account | Lightning Record Pages.
- Select the Lightning Record Page for Account and click Edit.
- Click on the Rating field in the Dynamic Highlight Panel.
- Navigate to the Conditional Formatting section in the right-side panel.
- Click Create Ruleset to start defining the formatting rules.

- Enter a Rule Name, then click Next to proceed.

Now that the ruleset is created, we can proceed to defining the formatting rules in the next step.
Step 2: Define Formatting Rules
In this step, we will add conditions to determine how the Rating field should appear when its value is Cold. Follow the steps below to configure the formatting:
- In the Ruleset Editor, choose the formatting options:
- Icon:Â Warning Triangle
- Icon Color: Red
- Set the condition:
- Field: Rating
- Operator: Equals
- Value: Cold
- click Next to proceed.

Repeat the above steps for Hot and Warm ratings as per the business use case:
- If Rating = Hot → Display a Green Rocket icon with the text Hot.
- If Rating = Warm → Display an Orange Smiling Face icon with the text Warm.
At the end of this step, the Ruleset for the Rating field in the Dynamic Highlight Panel will look like below screenshot:Â
Step 3: Save and Activate the Page
Now that the Conditional Formatting Ruleset is configured, follow these final steps to apply the changes:
- Click Save Ruleset to save your updates.
- Activate the Lightning RecordPage to ensure all users can see the updated formatting on the Account Rating field.
Once activated, the Dynamic Highlight Panel will now visually differentiate Cold, Warm, and Hot ratings, enhancing data clarity and user experience.
Steps 4: How to Delete Conditional Field Formatting in Salesforce
If you no longer need Conditional Field Formatting on a field, you can easily remove it through Lightning App Builder. Deleting a Ruleset will remove all applied formatting, such as icons, colors, and text styles, restoring the field to its default appearance. Follow the steps below to delete Conditional Field Formatting from a field.
- Navigate to Setup | Object Manager | Account | Conditional Field Formatting.
- Locate the Ruleset by its name.
- Click the dropdown on the right-hand side of the Ruleset.
- Select Delete from the dropdown menu.

- Click Delete to confirm the removal.

Things to Remember
- Formatting can be based on other field values, not just the selected field.
- Only predefined icons are available; custom icons cannot be added.
- A field can have only one ruleset, but multiple rules within it.
- Rules execute in order – once a rule evaluates as TRUE, remaining rules are ignored.
- Conditional Formatting rulesets must be manually added to Change Sets for deployment.
- If a Ruleset is referenced in a field, you will not be able to delete Conditional Field Formatting.
Formative Assessment:
I want to hear from you!
What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? Feel free to share in the comments below.




