How To: Create Roll Up Summaries using Flow [Video]

We’ve gone back through our archive this week, returning to a post which still today proves amazingly popular, often topping our weekly page views stats. Here’s a new video version of “How to Create Rollup Summaries Using Flow”!

Of course, we have upgraded to Lightning for this new video – just please forgive the few speed bumps encountered along the way…

All that is left for us to say is thank you for making the original post one of the most popular, and hope you enjoy the video just as much!

http://www.salesforceweek.ly/2015/02/how-to-create-roll-up-summaries-using-flow.html

http://www.salesforceweek.ly/2015/02/how-to-create-roll-up-summaries-using-flow-part-2.html

5 thoughts on “How To: Create Roll Up Summaries using Flow [Video]

  • Brilliant!!! Thank you! Question: What would be different if you were going to do a child record count (instead of a field sum)? Example: Number of child records that have “x”.

    • Great question, Roy!

      Up until recently, our answer would have been that you’d do something like this:

      – Look up all child records which meet your criteria
      – Assign those records to an sObject collection variable
      – Create a number variable, defaulted to 0
      – Loop through each item in the collection, and for each step of the loop, add 1 to your number variable
      – At the end of the loop, assign the final value of your number variable to the field you want the count stored in

      But as of Summer ’18, there is a new ‘equals count’ assignment operator in flow. So what you’d do now is even easier:

      – Look up all child records which meet your criteria
      – Assign those records to an sObject collection variable
      – Create a number variable, defaulted to 0
      – Assign that number variable to the ‘equals count’ of your sObject collection variable
      – Assign the value of your number variable to the field you want the count stored in

      The Summer ’18 release exam on Trailhead has the perfect use case for you to try this out! https://trailhead.salesforce.com/modules/platform-app-builder-cert-maintenance-su18/units/get-hands-on-with-flows

  • Hi I have a question,

    This was exactly what I needed, and I followed the instructions to set up a flow between my Opportunity Object and a custom Object (called Events) to sum up total opportunities associated with an Event via Lookup relationship.

    I’m running into an issue now though where I get an error message that says:
    Can’t Save Record
    We can’t save this record because the “Event Total Revenue Summary” process failed. Give your Salesforce admin these details. An unhandled fault has occurred in this flowAn unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Error ID: 1153245107-484387 (1499909013)

    anytime I try to create a new opportunity record in SFDC.

    Any help is greatly appreciated.

    P.S. I keep looking out for an email detailing the error, but I am not receiving anything. I’ve even added myself to the Apex Exception email list.

  • Very good solution. However, this does not work in case of child record deletion or undeletion. Any workarounds for the same>

  • hi, how to sum a field from multiple childs and needs to update in parent related record.
    thanks in advance.

Leave a Reply

%d bloggers like this: