Record Triggered flow

In the recent Salesforce came with before-save Flow triggers and after-save flow triggers. A record-triggered auto-launched flow makes additional updates to the triggering record before it’s saved to the database.

What is Record-Triggered Flow in Salesforce?

Record-triggered flow is an auto-launched flow in Salesforce which executes automatically on record creation, Update, or deletion. You can trigger the Flow when.

  1. A record is created
  2. A record is updated
  3. A record is created or updated
  4. A record is deleted

With record-triggered flows you can potentially avoid writing triggers in some specific scenarios. Like The flow runs anytime an item is deleted. A side note, do pay attention to the order of execution if you are working on your admin certificate. As per Salesforce A record-triggered flow can update a Salesforce record 10 times faster than a record-change process.

Record-Triggered Flow Scenario 1

Develop a process when an Opportunity is created with Amount more than 50000$ then create a task inside
that opportunity and assign it Account Owner. Also, create a chatter post inside the same opportunity. A big deal opportunity has been created. Please connect with opportunity and try to close this ASAP.

Solution: Check our below recording how to solve this with record Trigger flow.

salesforce record triggered flow

Scenario 2

Develop a process which will run on Contact Records which were created in last week and do not
have any related account. Then create a dummy account record and assign all these contacts to that new dummy account. The process should run weekly basis.

Solution: Check our below recording how to solve this with Scheduled flow.

How to create Record-Triggered Flow

YouTube video

Record-Triggered Flow Considerations

Understand the considerations and special behaviors of flows that make before-save updates

  • The flow can’t perform actions other than updating the triggering record’s field values.
  • The flow can’t update values in records that are related to the triggering record.
  • Only these elements are supported: Assignment, Decision, Get Records, and Loop.
  • The View All Data permission is required to activate an autolaunched flow that has a trigger.
  • If an object has multiple active record-triggered flows that are configured to run before the record is saved, we can’t guarantee the order in which those flows are executed.

Check our complete Salesforce Flow Builder Training here.

If you are new to Salesforce then please check our Salesforce Admin Training here. Check out the our YouTube, and don’t forget to subscribe to our channel, so that you’re notified right away when a new video is available. Check complete Salesforce flow builder training here.

Salesforce Flow Design Patterns

So, it’s important to learn about Salesforce Flow best practices and Salesforce Flow Design Patterns (what TO do and what NOT to do in Flow). Check out different design patterns for flow in Salesforce

  1. One Record-Triggered Flow” Per Object – Per Type
    • BeforeCreate/Update
    • AfterCreate/Update
    • Delete
  2. Create multiple record-triggered flows with “Set Trigger Order
Amit Chaudhary
Amit Chaudhary

Amit Chaudhary is Salesforce Application & System Architect and working on Salesforce Platform since 2010. He is Salesforce MVP since 2017 and have 17 Salesforce Certificates.

He is a active blogger and founder of Apex Hours.

Articles: 461

6 Comments

  1. Hi Amit
    In the last example, I am not able to update the contacts with Account id even after correcting all the errors. The flow is getting completed and I am using Update_Records with option ‘Use the IDs and all field values from a record or record collection’ and selected the ‘Contacts from Get_Records’. Still no contact is getting updated, only dummy account is getting created and action is executing. Can you help.

  2. Hello Amit,
    Firstly I would like to thank you for your informative blogs on SF.

    I have a doubt here, I have created a Record Triggered Flow on Contact Object. Now let’s say there is an Apex Class that updates a list of Contacts (let’s say a list containing 15 Contact records), now what is happening is, that the Record-Triggered flow that I have created on Contact Object is being called 15 times, ideally, the flow should have got called once and should have picked up all the 15 records in that single execution but that’s not happening. Where would I have gone wrong? What is an alternative other than writing an Apex Trigger?

    Thank you

  3. Create Record trigger flow assigned a value before save it is not working more than 400records how can we bulkify ??

  4. Thank you very much for your efforts Amit.

    You´re creating great content!!!

    Regarding Scheduled Trigger Flow:
    >> if we define the scope at the very beginning (with a query) and we also use a Get Records element, in the same flow, wouldn´t be a risk of reaching governor limits sooner than expected?

    Kind regards

Leave a Reply

Your email address will not be published. Required fields are marked *