What is Actions and Related Records | After Save Flows | Practical Implementation | Flows Tutorial
Summary
Highlights
Actions and Related Records, also known as After Save flows, are used for post-processing actions like sending emails or updating related records after a record has been saved. This differs from Fast Field Updates (Before Save flows) which are for operations before saving the record.
The video presents a scenario where opportunities with an amount greater than 1 lakh need to trigger an email to team members. This email notification is a post-processing action, thus requiring an After Save flow, unlike merely setting the priority of the opportunity which could be a Fast Field Update.
To implement this, navigate to 'Flows' in Salesforce setup and create a new 'Record-Triggered Flow'. Select 'Opportunity' as the object, trigger the flow when a record is 'Created', and set the entry condition to 'Amount greater than 1 lakh'. Crucially, choose 'Action and Related Records' for optimization, as it runs after the record is saved.
After selecting 'Action and Related Records', add an 'Action' element and choose 'Send Email'. Provide a label like 'Send Email to Team'. For the email body, create a new 'Text Template' resource, including dynamic fields like the opportunity name. Define recipients using 'Recipient Address List' for hard-coded email addresses. Set 'Rich Text formatted body' to true and input a 'Subject' for the email.
Once all email details are configured, save the flow with a descriptive name and then activate it. Activation is necessary for the flow to run automatically when the defined conditions are met.
Test the flow by creating a new opportunity. First, create one with an amount less than 1 lakh to confirm no email is sent. Then, create a second opportunity with an amount greater than 1 lakh (e.g., 1 lakh twenty thousand). Verify that an email is received, containing the subject and body as configured, confirming the flow's successful execution.