Thanks again to everyone who responded to yesterday’s email about updating a record collection.

The most popular solution to test for > 0 records is to simply use a decision element with {Get_Contacts} Is Empty. This is simple and clean, and I’ll adopt this approach going forward.

Now, when updating records, it’s interesting to know that you don’t need to test whether there are > 0 records or not.

This means you can always apply the Update operation, regardless whether there are records in the collection to update or not.

For some reason, the Delete operation doesn’t work the same way. Before deleting records in a collection, you must verify whether there are > 0 records. If you don’t, Salesforce will throw an error.

The takeaway
As flows are being used so frequently these days, it’s good to know the fundamental rules for Get, Update and Delete operations.

Category:
Salesforce