Step By Step Guide To Creating Record-Triggered Flow in Salesforce : Adwait Gogate

Step By Step Guide To Creating Record-Triggered Flow in Salesforce
by: Adwait Gogate
blow post content copied from  Ashish Agarwal – Salesforce.com Architect & Blogger
click here to view original post


Update Child Records When There is a Change in Parent Record

salesforce record triggered flow

Record-Triggered Flow in Salesforce is one of the many types of Flows that you can use to automate your business processes. You can trigger the Flow when:

  • A record is created
  • A record is updated
  • A record is created or updated
  • A record is deleted

And run the Flow:

  • Before the record is saved
  • After the record is saved

With record-triggered flows you can potentially avoid writing triggers. Now you have the option of meeting complex business processes without writing a single line of code.

Flow is the future of automation in Salesforce and is becoming increasingly powerful with every release. If you are still using Workflow Rules and/or Process Builders to build new automations in Salesforce, I urge you to switch to flows and avoid incurring technical debt. 

Spring ‘21 Release Update – Refer to the Prior Values of the Record That Triggered Your Flow

Now when an object’s record is updated, you can access that record’s earlier values in Salesforce Flow. The ‘$Record__Prior global variable contains the record’s values immediately before the Flow was run. You can use these values to check for changes in fields and calculate differences in your flow. This acts as an ‘ISCHANGED’ condition in Process Builder which we have made maximum use of in the past. So now you can take benefit of it in Flow and build logic around it. 

For this guide, we will be covering how to use the aforementioned ‘$Record__Prior global variable in Salesforce Flow. After going through this guide, within the next 20 minutes, you will learn how to: 

  • Create a Record-Triggered Flow
  • Save & Activate the Screen Flow
  • Test the Screen Flow

In this guide, we will be creating a Flow to update all the Contacts’ addresses when the related Account address changes. Earlier it could be done using Process Builder, but now you can incorporate it in your Flows using $Record__Prior’ global variable.



To download a PDF copy of the presentation above




check to receive weekly updates on more of such awesome guides





(You'll never be spammed on my watch. And that's a promise)

References & Useful URLs:

The post Step By Step Guide To Creating Record-Triggered Flow in Salesforce appeared first on Ashish Agarwal - Salesforce.com Architect & Blogger.


February 23, 2021 at 03:30AM
Click here for more details...

=============================
The original post is available in Ashish Agarwal – Salesforce.com Architect & Blogger by Adwait Gogate
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================

Salesforce