Blog
02/10/2023
Winter 24- custom error message using Record Triggered Flow
Quite a buzz going around in the Salesforce ecosystem about the Winter-24 release features especially related to lightning flow. So let’s discuss one of the features i.e. Display custom error messages using Record Triggered flow.
Use Case :-
Universal Containers has implemented CPQ & they are heavily using Quote Line Groups so that the Sales Rep can categorise the quote lines based upon the family of products like software, hardware or support products. Dates play a crucial role while doing the quotation in CPQ, so the business came up with a requirement, i.e. Quote Line Group Start Date & End Date should lie in between the Quote’s Start Date & End Date.
Implementation
One can choose either Apex Trigger or Record Triggered Flow to implement the solution, but one of the developers decided to use Record Triggered Flow using the Custom Error Element introduced by Salesforce in the Winter-24 release.
- Setup -> Quick Find -> Flows
Navigate To Flows
2. Click on New Flow -> Choose Record Triggered Flow -> Create
New Flow
Record-Triggered Flow
Note: Custom Error Element is only available in Record Triggered Flows.
3. Configure the Start Element as shown below:-
4. Use the Decision Box Element to compare the Quote line Group dates with Quote Dates.