Update 1000s of Records in Flow with Spring ’20

Dude. With the Spring ’20 release, we can now update 1000s of records at a time in Flow. The release itself doesn’t give us this power directly, but it allows developers to create invocable apex actions that can be reused for many objects.

Thanks to Alex Edelstein and UnofficalSF.com for an unmanaged package that performs this magic for us! Watch my video of how I use the “Map Collection” apex action to update the Activity Type of 5,000 records!

Update 5,000 Records at a Time

Update 10,000 Records at a time, sorta

To update 10,000 records, I divide the Tasks up into 4 groups based on their Status: Not Started, Completed, In Progress and On Hold. So I’m pretty much cheating and updating the records in groups of 2,500. The Assignments are setting the Status variable to the relevant status, then the Get Records will look for that chunk of records. The Decision is moving the Flow along in order to only update records with a certain status one time. The Assignment called “Count” is gathering the number of records in the collection and displaying that on the next screen, but this is optional.

We’re very close to being able to update records in batches purely with limiting the size of the collection. [FORWARD LOOKING STATEMENT! SAFE HARBOR!]

Narender Singh at ForcePanda has an Apex Action that will gather a limited number of records into a collection. I confirmed with him a few days ago that he has not yet created an action to allow us to give criteria to determine which records we want to collect. So close! Somebody can make this, yes?

Great question! These are all new features that are being figured out so I’d check on UnofficialSF.com to see if anyone has done it. Otherwise, you might be the first and when you figure it out you should blog about it 🙂