Salesforce and Rollup Summaries
Salesforce offers a powerful out-of-the-box tool called Rollup Summaries. This feature allows users to calculate values from related child records and display them on the parent record. Native rollup summary fields can:
- Count the number of child records.
- Add (sum) values and display the total.
- Show the minimum or maximum value for numeric fields.
However, there are limitations that sometimes make Salesforce’s native rollup functionality insufficient for more complex use cases.
With native Salesforce rollups:
- You’re restricted to Master-Detail relationships, leaving you unable to roll up data from objects with Lookup relationships.
- Rollup options are limited to SUM, COUNT, MIN, and MAX on numeric fields (date and date/time fields can be used for MIN or MAX).
- You can only create 25 rollup summary fields per object (this limit can be increased to 40 with Salesforce Support).
This is where third-party apps like Declarative Lookup Rollup Summaries (DLRS) come in handy. In this article, we will review DLRS, a community-driven, open-source managed package that fills these gaps by providing a no-code, flexible solution for creating rollups on Lookup relationships. DLRS offers more advanced aggregation operators, the ability to run rollups in real time or on a schedule, and is available at no cost.
Salesforce Declarative Lookup Rollup Summaries (DLRS)
In the Salesforce ecosystem, data is key. But extracting insights from related objects—especially when using Lookup relationships—can be challenging without writing code. This is where Declarative Lookup Rollup Summaries (DLRS) comes in. Built by the Salesforce community, DLRS provides an intuitive, no-code interface for creating rollup summaries across Lookup relationships.
What is DLRS?
DLRS is an open-source, community-driven tool that allows Salesforce admins to build cross-object summaries using a point-and-click interface. With DLRS, you can:
- Define and manage rollups between Lookup relationships without needing Apex triggers.
- Use filter criteria to control and refine which data gets summarized.
Why DLRS Stands Out
DLRS is a powerful tool because it provides features that Salesforce’s native rollup summaries simply can’t match. Here are the key reasons why DLRS is a must-have for admins:
- No-Code Rollups for Lookup Relationships: Unlike native rollups, which are restricted to Master-Detail relationships, DLRS enables rollups between Lookup relationships—all without writing a single line of code.
- Advanced Filter Criteria: DLRS gives you the ability to add multiple filters to control which records get summarized, including more complex filters like relative dates, which aren’t possible with native rollup summaries.
- Flexible Scheduling Options: Rollups can be run in real time, scheduled at specific intervals, or triggered via API, giving you control over when and how rollups are calculated.
- Custom Metadata Support: Easily deploy your rollups across different orgs using change sets or packages. This makes DLRS highly scalable and adaptable to multiple environments.
- Comprehensive Aggregation Operators: DLRS supports a wide variety of aggregation operators, giving you more ways to summarize data beyond the standard Salesforce options. These include:
- Sum: Add up numerical values.
- Max/Min: Find the largest or smallest values for numbers, dates, or date/times.
- Average: Calculate the mean of numerical values.
- Count/Count Distinct: Tally up the number of child records, with or without duplicates.
- Concatenate: Combine child record values into a single string.
- No Limit on the Number of Rollups: With DLRS, you can create as many rollup summaries as you need, removing the limitations of Salesforce’s native feature.
- Error Logging and Troubleshooting: If a rollup fails, DLRS logs the issue in the Rollup Summary Logs tab, making it easy to track and fix problems.
Things to Consider
While DLRS is incredibly versatile, there are a few considerations to keep in mind:
- Professional Edition support is limited. You’ll need to use Invocable by Automation Calculation Mode or rely on manual/scheduled recalculations.
- Apex triggers and tests: Since DLRS dynamically deploys Apex triggers, ensure that all sandbox and production org tests are functional.
- Performance impact: Real-time rollups can become resource-intensive, especially when combined with other automations. If platform limitations arise, consider switching to scheduled rollups.
Ready to Take Your Salesforce Rollups to the Next Level?
If you’re looking to simplify your data management in Salesforce and maximize the power of DLRS, Port & Starboard is here to help! With years of experience in Salesforce solutions, we can guide you through the setup, customization, and optimization of DLRS to fit your unique business needs—whether you’re just getting started or need more advanced rollup functionality.
Contact us today to streamline your Salesforce processes and unlock the full potential of Declarative Lookup Rollup Summaries!
Resources and References
To learn more about DLRS, check out the following resources: