---
title: "Using Declarative Lookup Rollup Summaries (DLRS) in Salesforce"
description: "Using Declarative Lookup Rollup Summaries (DLRS) in Salesforce"
keywords: "Declarative Lookup Rollup Summaries (DLRS) Salesforce Rollup"
url: "https://myrapidi.com/wiki/using_declarative_lookup_rollup_summaries_dlrs_in_salesforce"
locale: "en"
published: "2025-06-17T10:45:22Z"
modified: "2025-06-17T10:49:24Z"
---

**Declarative Lookup Rollup Summaries (DLRS)** is a free, open-source Salesforce tool that allows you to perform **roll-up summary calculations on lookup relationships** , something standard Salesforce does **not support natively**.This functionality works great in combination with the Rapidi custom objects ( Posted Sales Invoices, Posted Sales Credit Memos, Customer Ledger Entries, Sales Orders) which are provided as part of the [standard integration](https://wiki.myrapidi.com/wiki/standard_integrations) package.&nbsp;  
  
Use cases include:

- Summing revenue from child objects (e.g., Invoices) to parent objects (e.g., Account);
- Calculating **Year-To-Date (YTD)** sales;
- Summing **Payments Received** per customer.

### Installation Instructions:

1. Go to the Salesforce AppExchange : [https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3000000B45gWEAR](https://github.com/afawcett/declarative-lookup-rollup-summaries)
2. Under **Installation Options** , choose:
  - **Managed Package** for most users (easy to upgrade and maintain);

3. Install it in your **sandbox** first to test;
4. After installation, you will see a new app: **Declarative Lookup Rollup Summaries** under **App Launcher.**

### Key Components After Installation:

- **Lookup Rollup Summaries Tab** : Define and manage your rollups;
- **Custom Metadata (Setup \> Custom Metadata Types \> Lookup Rollup Summary)**: Advanced config view;
- **Schedule Jobs** : Configure scheduled or batch rollups.

### Example: Rolling up Posted Invoice Totals to Account:

Scenario:

You have a custom object `InvoiceHeader__c` (posted sales invoices) related to `Account` via a **lookup field** `Bill_to_Customer__c`. You want to:

- Sum the total amount invoiced **in FY 2026 (Apr 2025 - Mar 2026)** to `AnnualRevenue__c`

### Step-by-Step Configuration (using Metadata UI):

1. Annual Revenue Rollup

- **Lookup Rollup Summary Name** : Annual Revenue Rollup
- **Parent Object** : Account
- **Child Object** : InvoiceHeader\_\_c
- **Relationship Field** : Bill\_to\_Customer\_\_c
- **Relationship Criteria** :
- 
```
Posting_Date __c >= 2025-04-01 AND Posting_Date__ c <= 2026-03-31 AND Document_Type__c = 'Invoice'
```
- **Field to Aggregate** : Total\_Amount\_incl\_VAT\_\_c
- **Aggregate Operation** : SUM
- **Aggregate Result Field** : AnnualRevenue\_\_c
- **Calculation Mode** : Scheduled
- **Calculation Sharing Mode** : System
- **Active** : Checked

![](/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdXdEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--bc5d169950fb0d782b3e360cb682bf52d176cbd2/Declarative Lookup Rollup Summary Annual Revenue.png)

### Running the Rollups:

- Go to the **DLRS App \> Schedule Jobs**
- Click **Schedule All** to enable background calculation
- Or click **"Full Calculate"** to run immediately per rollup

### Limitations & Tips:

- You can't use dynamic TODAY() in filter logic directly. For fiscal year logic, create a formula field like `Fiscal_Year__c`.
- If data volume is large, always use **Scheduled** mode
- Avoid activating Realtime mode unless trigger management is fully set up

DLRS extends Salesforce with the ability to perform rollups on any relationship. It's essential for integration-heavy orgs, custom ERP syncs, and fiscal reporting where flexibility and filters are key.

With DLRS + simple criteria like `Document_Type__c = 'Invoice'` and fiscal date filters, you can automate year-based revenue reporting without writing a single line of code.
