Flow Blog Series 03:

Record-Triggered Flow

In the first blog, we showed you why Flow is the way to go! There are 5 flow implementation types you can choose from, but no stress! In this blog series you will find out which one you can use best in what scenario. Let’s go with the Record-Triggered Flow!

What is a Record-Triggered Flow?

A record triggered flow is seen as a renewed form of autolaunched flows. With this last one, you needed a process builder to trigger the flow. We consider this oldschool now. Because you can configure a trigger in the Record-Triggered Flow without having to use a process builder!

You can trigger the Flow when:

  • A record is created
  • A record is updated
  • A record is created or updated
  • A record is deleted

TIP! You can not only run the flow after the record is saved, but also before the record is saved!

Enough with the talking, let’s do something!

Imagine you want to count the total of account-to-account relationships. There is no standard way to do this. An account-to-account relationship is set up with a junction object with 2 lookups to account. But with a Record-Triggered Flow you can achieve this. So let’s create a demo together, and include that record trigger.

Create New Record Triggered Flow

First up, we need to make a record triggered flow which counts the account-to-account relationships.

Secondly, we get the records of the junction object, from the lookup field 1 to account (“Relation account”). In this case the junction object is called “Account Relation”.

Afterwards, we need to get the records of the junction object, from the lookup field 2 to account (“Account”). In this case the junction object is called “Account Relation”.

Drag and update

Now we need to drag the assignment to the canvas and make sure it counts the numbers of both lookup fields.

After that, update the field “Account Relation Count Total” with the total of the counted records from lookup field “Accounts”.

Last step for this flow is to update the field “Account Relation Count Total” with the total of the counted records from lookup field “Relation Account”.

Second Record Triggered Flow

So now you have a flow that counts the total, but you also need a flow that can update the total count when one or more records are deleted. Make a new record triggered flow and trigger it when a record is deleted.

Secondly, we need to get the “Relation Accounts” records from the junction object Account Relation.

Third, we need to get the “Accounts” records from the junction object Account Relation.

Assignment Logic

Next, we need to put the assignment logic to the canvas that counts the total.

Then, we put another assignment logic to the canvas that deducts the last total count.

And lastly, we need to update the Account and Relation Account records.

Flow Blog Series

Yeah! You know the way to go with that Record Triggered Flow now. Read more blogs and find out about other flow types too.

Flow Blog Series 01: Screen Flows

Flow Blog Series 02: Auto Launched Flows

Flow Blog Series 03: Record-Triggered Flow

Flow Blog Series 04: Schedule-Triggered Flow

Flow Blog Series 05: Platform Event-Triggered Flow

Stay posted
Menu