How To

Before and After Look at Flow in Cloud Flow Designer vs. Flow Builder – Multiple Records

CFDvsFB-Multiple.GIF

The new Flow Builder is coming in Spring ’19 to replace the Flash dependent Cloud Flow Designer interface to create and manage flows.

Note: I cover the high level summary of the differences between Cloud Flow Designer and Flow Builder in my blog post: Move Over Cloud Flow Designer, Here Comes the New Flow Builder.

Let’s take a closer look at a flow I created in Cloud Flow Designer and how this now looks in the new Flow Builder, specifically handling multiple records in a collection.

This flow uses the Fast Create, Fast Update, Fast Lookup and Fast Delete flow elements. These are DML actions that occur with a collection of Salesforce records.

CloudFlowDesigner.GIF

View image full screen

In the new Flow Builder, this same flow looks like this:

FlowBuilder-Multiple.GIF

View image in full screen

The Fast Lookup in Cloud Flow Designer looks up the Contact object where the AccountId equals the variable recordId and then saves the Id in the variable.

FastLookup.GIF

The same flow element in the new Flow Builder is now using the Get Record flow element, which looks like this:

Get Record combines the Cloud Flow Designer’s Record Lookup and Fast Lookup into one flow element.

If you are looking to work with multiple records, select “All records” for How Many Records to Store. Then in the Select Variable to Store Contact Records, select the record variable. Also, to set a null value if no records found, check the box “When no records are returned, set specified variables to null.”

GetRecords-Multiple.GIF

View image full screen

Here is the record variable meant to store a collection of records.

RecordVariable.GIF

View image full screen

In a Fast Update flow element in Cloud Flow Designer updates the Contact records in the sObject Collection Variable {!sObjUpdateContacts}. It will update the Premier Client custom field.

FastUpdate.GIF

In Flow Builder, this is now a Update Record flow element, which looks like this:

The Update Record flow element combines Cloud Flow Designer’s Record Update and Fast Update into one flow element.

When updating multiple Salesforce records, select “Use the IDs and all field values from a record variable or record collection variable” under How to Find Records to Update and Set Their Values.

Under the Select Variable section, select the record collection variable {!sObjUpdateContacts} to store the Salesforce records.

UpdateRecords-Multiple.GIF

View image full screen

Here is the record variable meant to store a collection of records to update.

RecordVariable-UpdateContacts.GIF

In a Record Create flow element in Cloud Flow Designer creates a record in the Task object and sets the AccountId, OwnerId, Subject, Priority, WhoId and Activity Date fields with the assignment flow element. It will create a collection of Task Records stored in the record variable {!sObjColTaskToBeCreated}.

fastCreate.GIF

View image full screen

In Flow Builder, this converts to the Create Records flow element, which looks like this:

The Create Records flow element combines Cloud Flow Designer’s Record Create and Fast Create into one flow element.

If you want to create multiple Salesforce records, select “Multiple” under How Many Records to Create and select a record variable under Select Variable. In our solution, we are creating task records that are contained in the record collection variable {!sObjColTaskToBeCreated}.

CreateRecords-Multiple.GIF

View image full screen

Here is the record variable meant to store a collection of records to create.

RecordVariable-CreateTasks.GIF

Lastly, the flow element Fast Delete in Cloud Flow Designer deletes multiple Salesforce records from the Case object that are contained in a sobject collection variable {!sObjColDeleteCollection}.

FastDelete.GIF

The Fast Delete translates into the Delete Records flow element in Flow Builder, which looks like this:

Delete Records combines the Cloud Flow Designer’s Record Delete and Fast Delete into one flow element.

To delete multiple Salesforce records, select “Use the IDs stored in a record variable or record collection variable” under How to Find Records to Delete. Under the Select Variable section, select the record variable or record collection variable. In our case, we will select the record collection variable {!sObjColDeleteCollection}.

DeleteRecords-Multiple.GIF

View image full screen

Here is the record variable meant to store a collection of records to delete.

RecordVariable-DeleteContacts.GIF

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s