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.
- A record is created
- A record is updated
- A record is created or updated
- 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.
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
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