Actually, I don’t know when this change happened, but I just noticed that Flow loops now only have four steps instead of five. The two assignments can now be consolidated into one.
You still have to add the record to a collection, but you can use the same assignment element.
Example 1: Update the record currently in the loop.
Use a Get Records element to create a collection of records to loop through.
Add a loop element
Add ONE assignment element
Update field values for record currently in the loop.
Create a new record collection variable to hold the records you want to update.
Use the same assignment element to add the record currently in the loop to the new collection.
Add an Update Records element to update the records in your new collection.
Follow my blog to keep up to date on Flow and Salesforce
Example 2: Create new records.
Use a Get Records element to create a collection of records to loop through.
Add a loop element
Add ONE assignment element
Create a new record variable (not collection) to hold the values of the new record you want to create.
Assign field values to your new record variable.
Create a new record collection variable to hold your records that you want to create.
Use the same assignment element to add the record currently in the loop to the new collection.
Close the loop.
Add a Create Records element to create the records in your new collection.
Previously step 3 involved two assignment elements!
Watch this recording on Flow loops.
This is how you would combine steps 3 and 4 into one assignment!
Log an email message on the contact record like this one.
UPDATE SUMMER ’23: This is no longer necessary! Read here.
When sending email from a contact record, it magically logs the message to your activity log. In classic, emails were/are automatically logged to the Activities related list. Well, flow doesn’t do that for you. Let me show you how to log it so you and your colleagues know when an email was sent to a contact.
After you add a “Send Email” action to your flow, add two more Create Records elements to the canvas. You will create records of these objects:
Session Description: With Flow becoming the dominant declarative automation tool, business problems we are solving with automation are becoming more complex. We need to be able to build scalable Flows that are easy to maintain, upgrade and troubleshoot, but handling errors in Flows is not always intuitive and user friendly process. Flow Error Handling solution from Salesforce Labs helps Admins to discover Flow errors in faster and more straightforward way. In this session we will show how Admins can use this Salesforce Labs Flow solution to pinpoint exactly where the process went wrong and obtain crucial details of the recorded incident that will help with troubleshooting and fixing the problem in a timely manner.
*Thomas George taught me how to handle flow errors this way when we worked together at Optimum Energy. I love that I got to share it with others through Salesforce Labs.
The flow will display either a photo or remind you to upload one. On any object!
How It Works:
The Flow looks for a file attached to that record with the title “SalesforcePhoto” (or another phrase of your choosing).
The File gets the title from the name of the file when you upload it. If you upload SalesforcePhoto.jpg, the title becomes “SalesforcePhoto.” You could also open the File details in Salesforce and change the title.
If not found, it asks you to upload a file from your computer named SalesforcePhoto and attaches it to that record. From then on the, the flow displays the photo!
We are using the app because constituents and donors are more than just a record, and seeing their faces humanizes the data.
“Here is the use case: sending a family of a deceased relative one letter with all the names of people who have donated in memoriam. So, one letter to the family for many people who gave. Client is a large hospice so this is happening weekly. Open to different options — apps? exports & merge? other? Thanks!”
Well, I’m a few months late, but here you go, Rob. I made a Flow that sends out an email like the one below. I see now that you said “letter”…oops. Hopefully you figured out a solution by now, anyway!
Flow improved so much in 2020 (yes! a good thing actually happened in this Great-Pacific-Garbage-Patch of a year) that I was able to take out much of the complication of setting up this app.
And thanks to RAD Women Code courses 1 & 2, I was able to add a Visualforce controller and Apex Tests! I am so grateful to my incredible coaches and cohorts.
What matters for you is that it is much easier to install. It’s still not easy to install but hey, it’s 2021. You can handle what life throws at you.
Join me for a Salesforce.org webinar Intro to Flow on Thursday, Apr 9, 2020 9:00 AM – 10:00 AM PDT. Register here.
Remember back when there were community events and conferences? I had the honor to speak at Cactusforce in Phoenix in January — highly recommend this small event! So many MVPs, so many recognizable experts in one small event. And the weather was great.
Session Description: Flow Loops unlock incredible power previously held only by devs. Without using any code, Admins can create an automated process to loop through all related records and take actions based on what is found there!
Towards the end of the video I talk about Spring ’20 amazingness with Flow that you can read more about here and here.
Go Ahead: Loop Through that Collection in Flow – Jessie Rymph from Marisa Hambleton on Vimeo.