On a project that has me doing a lot of Salesforce Flow. I’ve seen a lot of people using a loop to do record count which was probably the only solution a couple releases ago but with all of the enhancements constantly coming it is hard to keep up. Anyhoo, this is a quick way to get a record count
- Do a ‘Get Records’ to create the collection of records
- Create a ‘Number’ variable called like ‘recordCount’ or ‘quoteCount’ for something more specific to the object type
- Use ‘Assignment’ and when you set the number variable to ‘recordCount’ you can use the Operator ‘Equals Count’. The value is the ‘Get Records’ collection name or the specific collection name
Say no to looping to get counts…this should be easier and I’m sure at some point they’ll fix this to be built-in so you can use the operator in ‘Decision’ when trying to decide whether there’s zero, 1, or many records related like understanding Opportunities and related Quotes.