Suppose you know you need a record-triggered flow: You want to perform automated steps based on the transactions executing in your Salesforce Org.
If you deal with related records, you know you will be in the after-save mode (a.k.a. Actions and Related Records).
If you have come this far, this means you have already found answers to two essential questions:
- What type of flow do I need?
- If it is a record-triggered flow, will it be before-save or after-save?
You know that I answer a lot of flow questions on a regular basis. My observation is that folks often struggle with the next critical step:
Which object will I be triggering on?
Based on the previous decisions, we know you are already dealing with at least two objects. However, suppose a junction object is involved, like an Opportunity Contact Role that connects the Opportunity to Contacts or an Opportunity Line Item that connects the Opportunity to the Products. In that case, you may have three or more objects involved.
This is the part where things get confusing:
Which object will I trigger on, and what object(s) will I create/update?
The answer is surprisingly simple when you fill in the blanks in this format:
I want to create/update __ Object records when __ Object records are created/updated.
What you write in the second blank will show you what object you are triggering on.
Once you know that, you will need to go from one Object to the other using the relationships. Depending on the depth and the structure, you may use multiple gets.
I thought I’d step back from technical posts for now and focus on the fundamentals again.
P.S. Originally published on 06/15/2022.
Read the previous issue of the newsletter here.
Read the next issue of the newsletter here.
Subscribe to the weekly educational Salesforce Flow Tips newsletter here.