To understand how to solve the same business use case using Process Builder. Check out this article Getting Started with Process Builder – Part 53 (Field history tracking for Multi-Select Picklist).
Big Idea or Enduring Question:
- How do you track what has been changed on a Multi-Select picklist?
Tracking field history is an out-of-the-box feature to track value changes in a field. You can select certain fields to track and display the field history in the History related list of an object. The field history data is retained for up to 18 months. Note that the Long text area, Rich text area, and Multi-select Picklist fields are tracked as edited, but their old and new field values are not captured when the record is updated. History tracking capture the following information:
- Prior value
- Current value
- Who has done the changes
- When it was changed
After reading this blog, you’ll be able to:
- Understand how to track field value changes for Multi-select picklist
- Use After-save Record-Triggered Flow to create a record
- Access the prior value of a record in the record-triggered flow
Business Use Case
Pamela Kline is working as a System administrator at Universal Containers (UC). She has received a requirement to enable field history tracking for multi-select picklist (Country) on the Lead object, also capture country old and new values.
Automation Champion Approach (I-do):
There are multiple ways to solve the above business requirement. You can either use Apex trigger, Salesforce Flow, Process Builder, and more. To solve this requirement, we will use the After-save Record-Triggered Flow.
Salesforce now (After Spring’21 Release) allows you to add access to the PRIOR Value of a record in the Salesforce Flow, similar to the Process Builder. This is a major enhancement that will ultimately bring Flow to the next level.
After selecting the object Salesforce will automatically create a record variable ($Record__Prior) of the type selected object. Now you can refer to it anywhere in the flow.
Before diving further, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it. Let’s begin building this automation process.