Salesforce Rollup Summary on Lookup Relationship | DLRS Tutorial
Вставка
- Опубліковано 10 лют 2020
- Rollup Summary Fields provide a great way to summarize data about child records on the parent record. However, the native Rollup Summary fields only allow the ability to summarizes data based on master-detail relationships.
The Declarative Lookup Rollup Summaries tool (DLRS) provides a powerful yet declarative way to create rollup summaries based on lookup relationships.
This is a step-by-step tutorial on how to create Salesforce Rollup Summaries on Lookup Relationships using the DLRS tool.
Download Link: github.com/afawcett/declarati...
Documentation: github.com/afawcett/declarati...
*** BONUS for Nonprofit Salesforce Admins ***
I've put together 8 frequently used Lookup Rollup Summary definitions which you can download here: tinyurl.com/nonprofit-dlrs
Definitions include:
1. Number of Campaigns Responded
2. Number of Campaigns Responded Last Year (or any other number of days)
3. Last Campaign Responded
4. First Campaign Responded
5. Last Touchpoint Date
6. Concatenated list of all the years a donor donated
7. Number of overdue tasks (Account)
8. Number of overdue tasks (Contact)
IMPORTANT NOTES:
1. I didn't get a chance to touch too much on the Calculation Sharing Mode options in this tutorial. The example I used in this tutorial used the Calculation Sharing Mode set to User. This means that the rollup will calculate based on what each user can see. So if there certain records they do not have access to, those will not be included in the rollup. If you want to include all records in the rollup regardless of whether the user has access to them or not, use the System Calculation Sharing Mode instead of User.
More info here: github.com/afawcett/declarati...
2. We only covered the Calculation mode Realtime in this tutorial. However, this calculation mode could lead to performance issues if you have too many records. In that case, consider the Scheduled or Process Builder options to ensure you do not hit system limits.
More information here: github.com/afawcett/declarati...
__________
Say hi on social:
LinkedIn: / farahcharania
Twitter: / signiforce
Facebook: / signiforce
**** BONUS for Nonprofit Salesforce Admins ****
I've put together 8 frequently used Lookup Rollup Summary definitions which you can download here: tinyurl.com/nonprofit-dlrs
Definitions include:
1. Number of Campaigns Responded
2. Number of Campaigns Responded Last Year (or any other number of days)
3. Last Campaign Responded
4. First Campaign Responded
5. Last Touchpoint Date
6. Concatenated list of all the years a donor donated
7. Number of overdue tasks (Account)
8. Number of overdue tasks (Contact)
I was tasked with putting some DLRS fields on a custom Event Request object. This is so helpful as it lays out the process step by step!
Thanks Ryan for the feedback. I am so glad the video was helpful!
- Farah
I used the link to get the definition examples which helped with my need... which was filtering on a picklist. THANK YOU!
Thanks Edward! So glad you found the video and download helpful.
-Farah
Whao. I didn't knew about this. Good job! :)
Thank you!
Thanks for the video - used this to count the number of related accounts on a contact - had to use the IsDeleted = FALSE criteria to get it to update after delete.
You saved my day.. thanks a ton champ..
You are welcome. I'm so glad the video was helpful!
-Farah
Thank you! Ive set this up a couple yeats before but forgot how. This video helped me to set it up at my new company
Thanks for the feedback Tony. So glad the tutorial was helpful!
- Farah
thanks for the great explanation............
You are welcome! I am so glad you found the tutorial helpful!
-Farah
Thank you this is very helpful:)
Thanks for the feedback! So glad you found the tutorial helpful!
- Farah
Thanks a lot
Thanks Rahul! So glad you found the video helpful!
-Farah
Question, I am building a DLRS on the Case object to count the number of times an agent replies to an email. If I want to exclude the Case auto-response email that is generated, what Relationship Criteria do you suggest I use to omit that one reply from the tally? Ty!
what is the Relationship Criteria for count number of open cases ?
Thanks for the tutorial. I'm trying to copy information from the new Program Management Module (First and Last Cohort) to Account so users can see what the organization's history is with us. My problem is that the program is running well with no errors but it's giving me no results. Do you think that this is typically because it does not recognize a variable or am I not using the right connection between the objects.
I'm at a loss without error messages.
Hi Abiud,
Glad you found the tutorial helpful. It is possible your relationship criteria needs tweaking. I recommend you post the question with more info and screenshots at the DLRS trailblazer group here: trailblazers.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000009O5p
Another place to try posting a specific question is in the power of us hub!
Hope this helps!
- Farah
Hello Farah - thanks for the great explanation! Have you hit any major hiccups using the tool ? Reason I ask is I want to use it on Opportunity object to rollup some custom field and store that result in lookup fields on a custom object. But our opportunities get updated every morning by an automated job (approx. 20K) records and then over the day we might have approx. 3k opportunities getting updated at times, my concern is - will this cause performance issues or break down ?
Hi Pallavi,
Thank you for your feedback and thanks for subscribing. You bring up a very good point. I wasn't able to cover the various calculation modes in the tutorial but yes, if you have a lot of records with a lot of updates happening you could run into performance issues if you use the realtime calculation mode. In that case, consider the Scheduled or Process Builder options to ensure you do not hit system limits or performance problems.
With a schedule mode you can schedule the rollup to run as a nightly batch which works very well. Here's a link to more information about scheduling rollups in DLRS: github.com/afawcett/declarative-lookup-rollup-summaries/wiki/What-you-need-to-know-about-Scheduling-Rollups
Hope this helps!
Farah
@@signiforce Thanks a lot Farah! - I will take a look.
@Signiforce Is 'HasResponded' a field on the Campaign object? I couldn't find it.
Never mind, it's on the Campaign Member object 😎. Thanks!
Yes that’s right, it’s on the Campaign Member object. Glad you figured it out 😀
Hi This saved my day today. Could you show how to set up a Scheduled job for updating the roll-up on Sundays?
Thanks Giancarlo, so glad you found it helpful! Great suggestion! I might do a follow up video with some of the advanced features and troubleshooting tips!
- Farah
Is there a way I can do this rollup summary on a lookup relationship without using DLRS tool? I am a volunteer at this non-profit, and I can't load packages. Besides, I am keen to go through the vanilla SFDC process (a trigger bases process is fine) to help me prepare for Admin-201 exam. Thanks in advance
Hi M,
Yes, you can definitely do rollups on lookup without DLRS. The other two options are to write a trigger or creating a flow. I feel the DLRS tool has a lot of good functionality so I prefer DLRS. If you want to go with the other two options, here are some tutorial videos:
1. Flow: ua-cam.com/video/EDD_7wDmPGY/v-deo.html
2. Trigger code: ua-cam.com/video/mE5WcxVlhjk/v-deo.html
Hope that helps!
-Farah
@@signiforce Thanks Farah for the links
Excellent 30,000 ft demo of the tool
Thanks Robert!
@@signiforce You're most welcome; you helped me/my company more than you'll ever know.😊
can we achieve this functionality using any automation tools process builder or flows or workflow something like that
Hi Sai,
Yes, you can definitely do rollups on lookup without DLRS by creating a flow. I feel the DLRS tool has a lot of good functionality so I prefer DLRS. Also, with a flow, there is a limitation of updating the rollup when a child record is deleted.
Here is a tutorial on creating a rollup on lookup via flow: ua-cam.com/video/EDD_7wDmPGY/v-deo.html
Hope that helps!
-Farah
Hello Farah,
How many rolleup summary fields can create in object using DLRS toll ??
Hi Siva,
You can create as many Rollup Summary fields as you would like with DLRS. I don't believe there is a limit in the number of rollups. However, you want to be careful to not create too many realtime rollups to avoid hitting the Salesforce governors limits. I would consider utilizing the scheduling options.
Here's a link to more information about scheduling rollups in DLRS: github.com/afawcett/declarative-lookup-rollup-summaries/wiki/What-you-need-to-know-about-Scheduling-Rollups.
Hope this helps!
Farah
Hey, In my case, Lead is the child object. I to set my criteria where Created Date of the lead is "last month". How would I write that properly in the Relationship Criteria? It's telling me that CreatedDate is not a field on Lead.
Hi Michael, without more specifics it is hard to troubleshoot. I recommend you post the question with more info and screenshots at the DLRS trailblazer group here: trailblazers.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000009O5p
Are you able to use relative dates for the relationship criteria? For example StartDate=THIS YEAR?
Hi Jenny,
Yes, you can use relative dates. You can use any of the SOQL query date literals. Here's a full list of all of them: developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm
Hope that helps!
-Farah
@@signiforce Thank you so much! Your video was the most helpful for getting started with DLRS.
Hi @@signiforce . This tutorial is great! I'm using a date literal on the relationship criteria but it doesn't look like is counting the right records. I'm using "HasResponded=TRUE AND Eng_Prog_Start_Date__c>LAST_N_YEARS:5" but is only counting for this year. Not sure what I'm getting wrong
Hi Maida,
Try: Eng_Prog_Start_Date__c = LAST_N_YEARS:5
Hope that helps!
- Farah
@@signiforce thanks so much. That was the issue.
Hey I am not able to see Deploy button(only Remove and cancel buttons are there) after clicking on Manage child trigger.... Can anyone please help on this??
Hi Meghraj, if you don't see the Deploy button then that usually means the trigger already deployed automatically. So the rollup should work. If you are still having issues, you can click the delete button and remove the trigger and then you will see the Deploy button again. But I don't think you need to do that.
Hope that helps!
Farah
Have you had a relationship criteria that is "NOT"? For example, I want to roll up the amount of all Opportunities that are NOT In-Kind Gifts.
Hi Jenny,
Yes, you can likely say something like Record Type ID != the ID for In kind donations. However, you shouldn't be using the DLRS tool at all for donation rollups. You should use the NPSP built in tool called Customizable Rollups which is designed for this exact purpose.
See these two videos for how to create Customizable Rollups:
ua-cam.com/video/307itOn2bvM/v-deo.html
ua-cam.com/video/cjlYlOQXSsM/v-deo.html
Hope that helps!
- Farah