Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by #AwesomeAdmin Trailblazers like you. Automation allows you to remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, let’s see how Eric Smith used a custom field and a simple record-triggered flow to make a value really stand out on a Lightning record page.
What’s my issue?
Sometimes you just want to make a certain field stand out on your page layout.
The standard detail section for a record page shows all fields the same way.
Quick–Where’s the case number?
I wanted to be able to see, at a quick glance, what the case number was on my case record page.
How could I make it stand out better while keeping it a part of the standard detail section?
Is this better?
WOW, how did I make that happen?
With a new custom field and a simple record-triggered flow, I’m able to display a formatted version of the case number.
Create a new field
Start by creating a new rich text area field. I gave mine the same “Case Number” label as the standard field (be sure to make the field API name unique) and the minimum value of 256 characters.
Build a flow
To set the value in the new Case Number field, I created a record-triggered flow that runs any time a new case record is created.
I used an After-Save flow (that is, I set it to Actions and Related Records) because the case number isn’t yet available in a Before-Save flow.
I updated it so that any time a new case record is created, the new rich text field will contain a formatted version of the case number.
I used a Text Template resource to create the rich text value so I could format it any way I liked. I started by selecting the Case Number field of the flow’s $Record variable as my resource, and I chose to apply a 22pt size and Bold to that value.
You can choose your own desired formatting here.
Change the page layout
The next step is to replace the standard Case Number field on your case page layout with the new rich text Case Number field.
Be sure to configure the field as Read-Only on the page layout.
Update the existing records
Since the record-triggered flow we created updates only the rich text field for new case records, I created a simple schedule-triggered flow to run just once to set the new field value for all existing case records.
This flow is designed to update a single record based on each $Record that gets passed to it. By configuring the Startnode as a one-time scheduled flow, it can select and pass all existing records one at a time through the flow.
Select a date and time that’s in the future and be sure to activate the flow before that time.
The criteria for selecting the case record is to process all records.
The Update Records acts on the global record variable ($Record) that’s passed to the flow for each case record and uses the same Text Template as shown in the record-triggered flow.
The advantage of a scheduled flow is that it will process the records in batches, which will avoid any limit issue you might’ve faced if you tried to do the updates in a loop in a regular flow.
If you want to test your scheduled flow before you have it execute the requested changes, you should run the flow in Debug mode. Just be sure to select the Run flow in rollback mode checkbox.
When you’re ready to proceed for real, just save and activate the flow and wait until the scheduled time for it to do its updating.
Now, you give this a spin...
With a single field and a simple flow, you’ve made it much easier for your users to quickly see a key value on the Lightning record page.
If you want to get even more creative in how you implement this feature, you could even add another record-triggered flow to fire on certain field changes and do things like:
Set the color based on whether or not the case is open or closed.
Add a unique icon if the contact is an internal user versus an external customer.
Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by #AwesomeAdmin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, let’s see how Michelle Hansen uses reactive screen […]
Welcome to another Automate This! In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by #AwesomeAdmin Trailblazers like you. With automation, you can remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, let’s see how Kristi Brown tackles some everyday […]
Welcome to another “Automate This!” In this live-streamed video series, we cover all things automation, from use cases and best practices to showcasing solutions built by #AwesomeAdmin Trailblazers like you. Automation allows you to remove manual tasks, drive efficiency, and eliminate friction and redundancy. In this episode, let’s see how Rebecca Glasser migrates and consolidates […]