Which Object Do You Trigger On?

Imagine you’ve pinpointed the necessity for a record-triggered flow to automate processes triggered by specific events within your Salesforce Org. This type of automation is a game-changer, promising to elevate operational efficiency and enforce uniformity in handling data and actions. The beauty of record-triggered flows lies in their capacity to respond dynamically to modifications within your data, streamlining the execution of complex workflows with minimal manual intervention.

When the task at hand involves managing interactions between related records, entering the realm of after-save mode, also known as “Actions and Related Records,” becomes inevitable. This approach is pivotal when your processes require the freshest version of a record, such as updating contact information following modifications to an account, or generating tasks subsequent to a deal closure. By leveraging the after-save mode, you’re equipped to base your actions on the most up-to-date data, thereby ensuring the integrity and relevance of automated tasks across your organization’s Salesforce ecosystem.

If you have come this far, this means you have already found answers to two essential questions:

  1. What type of flow do I need?
  2. 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.

Enjoy.

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.


Comments

2 responses to “Which Object Do You Trigger On?”

Leave a Reply

Discover more from Salesforce Break

Subscribe now to keep reading and get access to the full archive.

Continue reading