Flows Calling Flows

The true power of Flow comes from learning how to compartmentalize your logic into specific, reusable Flows that can be used throughout your implementation. I'll cover the basics of how to do this as well as a few other techniques in this post.

Continuing on from the Launch a Flow From Process Builder or Visualforce post...

Last time we made a flow that counts 1 type of Beer and puts that count on the Brewery record. Let's transform that into a reusable flow so we can count all types of beer at the same time! We'll do this by making a master flow that calls our new and improved flow many times.

I'll also be showing a technique that will help you to prevent updating records that do not need to be updated. It's important to prevent Salesforce Automation from snowballing - ie. Process Builder fires a Flow to update a record which then triggers a Workflow Rule to update another field which then fires a Trigger to then... Yeah, you get it. It's messy. And very difficult to troubleshoot when errors occur in the future.

Before Starting the Video

Here's a link to an unmanaged package that contains of all the config I'll be using including the Process Builder, Flows and Visualforce Page. Feel free to install it in a Dev Org and follow along: Flows Calling Flows Config

Here's the Master Flow we ended up with

Here's the Visualforce Page we ended up with


Popular posts from this blog

Joins in SOQL

SOQL from the Command Line

Modify Salesforce Data from the Command Line