Roll Up Related List Field to Lookup Record

Roll Up Related List Field to Lookup Record

Overview

This article explains how to use the Workflow Enhancement Suite (WES) to roll-up (i.e. aggregate) related list data to a lookup record.
Without WES, this solution would require custom deluge code to perform.

Video



Instructions

Setup the Workflow

To ensure the success of your roll-up function, make sure that the workflow is built on the related list module. For example, if I want to roll-up deal data to an account, I need to make the workflow in the deal module.
Also, your workflow trigger should be on edit of both A) the roll-up field and B) any condition on the roll-up. For example, if I want to roll-up deal amount of closed deals, the workflow should trigger on edit of Amount and Stage in the deal.
Warning: failure to do this can result in an improper WES data flow.

Access the Custom Action

In an existing or a new workflow, access the "Custom Action" menu, which is the last action in the workflow editor. The menu will open, and select the "Advanced Field Update (bludata)" action.

Note: This is available as both an Instant Action and Scheduled Action. If you are running into difficulties selecting this option in a Scheduled Action, please save and re-open the workflow.

Select and Configure the Appropriate Data Flow

Once selected, you will be presented with 2 options. Please select the "Sum or Count Related Records". In the next screen you will be presented with many options on how to roll-up the related records. The two categories are "From a Subform" to the Current Record or "To a Lookup Record" from the Current Record.
After this, you will be presented with a series of steps:
  1. Aggregate Operation: How the data will be aggregated. We currently support Sum, Count, Average, Min and Max
  2. From Field: The field that will be aggregated (a common example is Amount in the Deal module)
  3. Conditions: What related records to consider in the aggregate (e.g. only deals that Stage = Closed Won). You can add multiple conditions
  4. Aggregate Lookup Field: the field in the Lookup record that stores the result of the aggregate calculation

Once complete, hit "Save", provide a name that is appropriate (for future reference), and hit "Save and Associate".

Trigger the Data Flow and Track Results

When the workflow is triggered and the conditions are satisfied, the data flow will run.
To audit this data flow, you can view the Timeline of the affected record, or access the "WES Logs" to see if the data flow was a success or failure.