In this blog, we will discuss the topic of Triggered flows. There are three general types of flows:
- Screen Flow
- Auto launched Flow
- Triggered Flow
A record-triggered auto-launched flow makes additional updates to the triggering record before it’s saved to the database to trigger a flow when:
- A record is created
- A record is updated
- A record is created or updated
- A record is deleted
In a record trigger we create a record and then we have some sort of trigger on our flow and those flow is going to be executed and all the actions we have performed on the flow will also going to be executed.
To create a record trigger flow, as shown in the below image we will use the steps below.
Don't forget to check out: Apex Triggers Unit in Salesforce - The Trailhead Guide
Here are the Steps to Create a Record Trigger Flow
Step 1: From Setup, enter flows in the Quick Find box, then select Flows.
Step 2: Click the ‘New Flow’ button.
Step 3: Select Record-Triggered Flow.
Step 4: Click the ‘Create’ button and the ‘Configure Start’ window opens.
Now Define the Trigger Using the Following Steps as:
Step 1: For Object, select Opportunity.
Step 2: For Trigger the flow, select ‘A record is created or updated’.
Step 3: For Condition Requirements, select ‘All Conditions are met (AND)’.
Step 4: Define the first condition and click 'Add Condition'.
Step 5: To optimize the flow, select ‘Actions and Related Records’ and Click Done.
Now to Create a Record Using the Following Steps:
Step 1: Click + to add an element.
Step 2: Scroll to the Data section and click Create Records. The New Create Records window opens.
Step 3: For How Many Records to Create, keep one selected.
Step 4: For Object, select Contract and Click Add Field and set the Status of the new contract.
Step 5: Click Done.
Check out another amazing blog by Bhawana here: What is External ID in Salesforce - The Definitive Guide
Save and Debug the Flow:
Step 1: Click Save.
Step 2: For Flow Label, enter ‘Closed Won Opportunities’ and the flow API name will automatically be updated.
Step 3: Enter the Description.
Step 4: Click on the ‘Save’ button.
Step 5: Click ‘Debug’ and hence the flow is created.
So, this is all about Record-Trigger Flow and I hope this information will be helpful to you.