Getting Started (for version 2.21)

Creating a New Lookup Rollup Summary

Open the “Manage Lookup Rollup Summaries (Beta)” from the App Launcher.

DLRS Beta from the App Launcher

On this page, at the top of the list view, click the “New” button. If this is the first rollup created in the org, the “Create Rollup” modal window (Step 3) will launch when you open this page.

DLRS Beta list view and new button

Fill out the following fields. While not all fields listed below are required to save a rule, all fields below are required to have a working rule.
- Lookup Rollup Summary Label (Lookup Rollup Summary API Name will auto-populate)
- Child Object
- Field to Aggregate
- Relationship Field
- Parent Object
- Aggregate Result Field
- Rollup Type
- Calculation Mode
- Calculation Sharing Mode

Below is an example of a simple rule.

DLRS Beta Basic Complete Example Rule

All fields, both required and optional, that appear on this page are defined in the chart below.

Information Fields

Name Description
Lookup Rollup Summary Label Name of your new rollup
Lookup Rollup Summary API Name API Name of your new rollup. This is automatically populated from the Lookup Rollup Summary Label.
Description Fill this in to help yourself and others remember what this rule is for.

DLRS Beta Information Fields

Child Object Fields

Name Description
Child Object Pick the child object that you want to do your rollup from.
Field to Agregate The field on the child object that you will be performing a rollup on.
Relationship field Lists all fields, with relationship fields listed first. You can use any field you need.

DLRS Beta Child Object Fields

Parent Object Fields

Name Description
Parent Object The object that will hold the field where you roll up to.
Aggregate Result Field This is the field that will hold the output of your roll up rule.

DLRS Beta Parent Object Fields

Relationship Criteria Fields

Name Description
Relationship Criteria If you want to filter the Child Object records enter the SOQL WHERE query here (e.g. Amount >200 AND Stage = ‘Closed Won’)
Relationship Criteria Fields Enter any field that will be used in the Criteria from above, enter one field per line e.g.
Amount
Stage
If you are referencing RecordType.Name or RecordType.DeveloperName in your WHERE clause, exclude them from the Relationship Criteria fields as it will result in an error.
Aggregate All Rows - Include Deleted & Archived Records This setting will allow you to also rollup from Deleted & Archived records. Can be used in conjunction with a SOQL query to only count those type of records.

DLRS Beta Relationship Criteria Fields

Rollup Details Fields

Name Description
Rollup Type The type of rollup being performed. Options are:
Sum
Max
Min
Avg
Count
Count Distinct
Concatenate
Concatenate Distinct
First
Last
Please see: Aggregation Operators to see how each Rollup Type works
Concatenate Delimiter If using ‘Concatenate’ or ‘Concatenate Distinct’ in Aggregate Operation, the delimiter is used to separate the values e.g. , (comma) : (semi-colon) etc.
Field(s) to Order By Useful if concatenating.
Row Limit How many rows to include in the rollup.

DLRS Beta Rollup Details Fields

Calculation Mode Fields

Name Description
Calculation Mode Please see the Scheduling and Performance issues FAQ before setting the calculation mode as using the Realtime mode can run into performance issues and Apex CPU limits.
Watch for Changes and Process Later
- Run a full or incremental calculate on a schedule with Scheduled Apex (uses a trigger)
Realtime
- Uses the child trigger to immediately calculate rollups (uses a trigger)
Invocable by automation
- Call the DLRS Apex Action from a Flow or other automation, either as an immediate or scheduled action (does not require a trigger)
Developer
- Allows you to call DLRS from your own apex without using the DLRS trigger (does not require a trigger)
Calculation Sharing Mode Determines whether Salesforce sharing configurations should be taken into account when the rollup calculates.
User
- Calculates all records visible to the user who triggered the rollup calculation.
System
- Will calculate all records regardless of the current users access

DLRS Beta Calculation Mode Fields

Advanced Fields

The fields below are used when the test code methods need to be edited for deployment or to maintain code coverage. For more information please see this example where these fields were needed.

Name Description
Test Code (Child Object) Override the generated method body for the new test class used to test the DLRS trigger, useful if your child object needs values added, or other records created, to be successfully saved in Salesforce.
Test Code (Parent Object) Same as above, but using Parent instead of Child
Test Code Sees All Data? Checking this box tells the generated test classes that they can see your production data in the database when running tests. Not recommended but sometimes necessary. (No data will be harmed by using this setting).
For more information, see here

DLRS Beta Advanced Fields

Saving your newly created rule

Once you have filled out all fields, scroll to the bottom of the page and click “Create”. DLRS Beta Create New Rule Button

Once you have successfully created your rule, you will be greeted by similar toast messages. DLRS Beta Successful Rule Creation Message

Deploying / Scheduling your newly created rule

To deploy and/or schedule your rule, please go to the Scheduling Rollups v2.21 article.


Back to top

Declarative Lookup Roll-Up Summaries is a tool built and maintained by a community of volunteers through the Open Source Commons program. This is not a Salesforce-owned product. If you need support, go to the Trailblazer Community Group.