Andy in the Cloud

From BBC Basic to and beyond…

286 thoughts on “New Tool : Declarative Rollups for Lookups!

  1. Eeeeeeeek! This just saved me. I’ve been trying to figure out a solution on my own for weeks and after enough googling, I stumbled upon your post and your solution. Thank you so much for sharing this with the community!!!

    FYI – here’s the scenario I’ve been struggling with that this solved: We have created an opportunity hierarchy using a Parent Opportunity lookup field. We want to be able to report on the total value of child opportunities on the parent opportunity. This tool worked perfectly.

    [doing a happy dance]

  2. Hello Andrew,

    Is your tool work with standard objects like AccountTeam or opportunityTeam?



    • Yes, some only work in scheduled mode though. Try it out and raise issues in the Chatter Group linked on the readme file.

  3. Please Help! I am unable to get this to work in my sandbox. When I attempt to Calculate I get an error indicating the Rollup must be “active” but I am not seeing anywhere to set it as active or not??

    • Also I find it strange that when I try to use the Enhanced Edit – the Child Field to Aggregate picklist does not contain the field on the child object that I want to summarize – I am able to specify it when I create the rollup…but it is not available in this enhanced edit mode.

      • This could be a bug. Have you seen that there is a Chatter Comminity group linked on the Readme file. Lots of help in that group also. You can also search for known issues on the GitHub page for this tool. Finally try to use the Manage Rollup Summaries tab this is the recommended way to define rollups and is backed by custom Metadata that allows you to migrate your rollups via change sets

    • This is a field on the rollup definition

  4. Ok – I think Im on the right track now…seems I installed a WAY old version of the tool. Updated it and am currently waiting for the first calculate job to complete – THANKS!!

  5. I am using Account and a custom child object. I can’t get it to work in Real Time, but I can get it to work when I do Calculate and put in a simple Name LIKE … query. Is there something I could be leaving out ? It’s activated, and I have indeed chosen Real Time. I’m not using any of the optinal fields such as Relationship Criteria or Relationship Criteria Fields.

    • In realtime mode the tool needs to know what fileds to watch for changes in. By default this is the field your aggregating. So if that changes the realtime recalc will be done. If your changing other fields, you need to list them in the Child Relationship Fields field (if you don’t have a filter).

  6. ah ok – that makes sense. So I guess it will work in Schedule then ?

  7. Hi Andrew,
    Thanks for sharing. I have a difficulties with deploying Apex Trigger. Would you please advise of how to resolve this issue?

    dlrs_SCMC_Production_OrderTest.testTrigger System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Item is required: [SCMC__Item_Master__c] Class.dlrs.RollupService.testHandler: line 272, column 1 Class.dlrs_SCMC_Production_OrderTest.testTrigger: line 11, column 1

    dlrs_SCMC_Production_OrderTrigger:Test coverage of selected Apex Trigger is 0%, at least 75% test coverage is required

    • Take a look at the wiki on the GitHub repo it has an article around code coverage and test code needed in cases like this. The default test code the tool generates does not comply with the validations in your child object.

  8. We are using this to calculate a value that is an ‘average’. (i.e. the average number of match items for all child records in a group). The values returned are frequently more than 2 decimals, however, and we want to display them in an email {mere field} with 2 or less decimals. The Salesforce fields show 2 decimals when viewed on the account or in reports, but the merge field is pulling more. How can we limit the output from the rollup summary so the merge field displays correctly?

  9. HI Andy
    I am getting error when i deploy the code. code coverage is not done please can you help me.

  10. Hi Andrew ,

    is there any limit with this app.

    i am not getting new button after clicking on lookup rollup summary tab.


    • There are two ways to create rollups. Recommended is via the “Manage Rollup Summaries” tab. This supports custom Metadata and allows for easier migration of rollups from sandbox to production. The “Lookup Rollup Summaries” tab is the original option. You must manually copy over rollups from sandbox to production here. If you do want to use that option, keep in mind when opening that tab to see New you need to click Go and have the correct permissions assigned, these are permissions sets under setup for the tool. Hope this helps.

  11. Hi Andrew, this has proved VERY useful!

    I’m not the most experienced with this stuff, I’ve got a Roll-up to sum all “donations” (a custom object) for an activity but can’t find a way to make the same field but only for those ‘donations’ within a time frame, I.E a financial year. I’d love to be able to set it up and it update the dates for the FY each year rather than enter dates every April, but I can’t even get it to understand “equal to or greater than ___ date and Equal to or less than ___ date.

    Any ideas?

    Thanks so much for this AMAZING tool! 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s