All Ideas

Idea Details

Post an Idea
43,560  Points
No Plans to Implement
No Plans to Implement

Roll-Up Summary Fields: Formulas Rather than Static Criteria

Globalization & Custom Schema

Currently, the Roll-Up Summary Field functionality only supports the use of static criteria for evaluating which records to COUNT, SUM, etc. Certainly, that works in many situations and this has been a great feature. However, there are so many more situations where a Roll-Up Summary field is needed but the necessary logic cannot be defined without the use of a formula. Hence, this idea... Add the ability to use formulas when creating Roll-Up Summary fields. Below are some examples of Roll-Up Summary fields that can and cannot be created today, for comparison. Scenario: a custom object called Project has a Mater-Detail relationship with the Opportunity object. In effect, one opportunity can have on or many related projects. Each project has fields for Start Date, Estimated End Date and Actual End Date. Example 1 - CAN be accomplished today Create a Roll-Up Summary field on Opportunity which provides a COUNT of all related Projects where Actual End Date is NULL (blank). In effect, a COUNT of all OPEN projects (though a bit suspect as it doesn't account for Projects that might not have started yet). Example 2 - CANNOT be accomplished today Create a Roll-Up Summary field on Opportunity which provides a COUNT of all related Projects where Start Date is less than or equal to TODAY and Actual End Date is NULL (blank). In effect, a more accurate COUNT of all open projects (excluding any that have not yet begun). Example 3 - CANNOT be accomplished today Create a Roll-Up Summary field on Opportunity which provides a COUNT of all related projects where Estimated End Date equals THIS MONTH and Actual End Date is NULL (blank). In effect, a COUNT of all projects expected to end in the current month but have not yet ended. I'm sure that there are many other great examples of formula-based Roll-Up sumarry field logic. Many of which likely have nothing to do with date comparisons. Please provide comments with your other examples.

Merge Idea · Flag

Latest Comment from Salesforce

  • IdeaExchange Moderator - 2 years ago

    Hi Everyone- quick update from product management, please see below

    Using a formula in Roll-up Summary Fields is something we'd like to do but we have a few priority items ahead of it so it hasn't been prioritized on our current roadmap. 

    In the meantime, some customers have suggested the Declarative Rollup Summary Tool as an alternative (it is free). Per one comment, "When setting up a new rollup with this tool you can specify relationship criteria for querying the child object with a typical SOQL where clause." We have not tested this ourselves, but did want to provide the link so you can research and potentially use it should it work for your particular scenario. 

    https://developer.salesforce.com/page/Declarative_Rollup_Summary_Tool_for_Force.com_Lookup_Relationships

    We'll keep this Idea open and actively tracking on it so that we can post again when and if there are any new updates.
  • Upvotes
  • Downvotes

Ideas

Apps

from AppExchange

Questions

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



 

 

Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


 

Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.