wes1278 / declarative-lookup-rollup-summaries

Declarative Rollup Summaries for Lookups

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Declarative Rollups for Lookups!

Features Summary

  • Rollup information between Lookup relationships not previously possible without writing Apex Triggers
  • Define rollups using standard UI declaratively, no coding required
  • Define filter criteria on rollups for example Rollup Amount on Opportunity onto Account for Closed Won
  • Supports Realtime, Scheduled and Developer API modes
  • Open source, available in code and managed package form.
  • Managed package has passed Salesforce Security Review and is Aloha enabled (does not consume app, tab limits)

Please refer to the blog posts below for more detailed information.

Documentation

You can read more detailed information about this tool and how to use it at my blog here and the latest features in the Spring'14 release here. There is also an early releaes video demonstration here...

Usage Information and Known Issues

  • This tool uses SOQL Aggregate queries and is subject to platform limitations. This basically means...
  • For each rollup, there is a maximum of 50,000 child relation records that can be summarised each time child record/s insert/update/delete operations are made (which may process several configured rollups). The rollup processes children to rollup by their parent record relationship and an optional further filter if provided. Meaning so long as this relationship does not result in more than 50,000 child records per parent parent record it will be successful. Take a look at the second blog post above which describes some new configuration settings to help calibrate the tool when running the Scheduled or Calculate jobs to help work within the 50,000 row limit.
  • For performance reasons ensure the fields used are indexed (lookups are by default) and also any fields used in the filter criteria. This can be very important as without this, a full table scan will occur when the platform executes the SOQL and cause performance issues. For more information from Salesforce please see here and here.
  • When using the Realtime mode, Formula fields as fields to aggregate are not supported (validation will be added in a future release to block this). To work around this, either switch to Scheduled mode or in Relatime mode use a Workflow Field Update to copy the formula field value to a physical field and reference that.
  • While the tool can be installed and enabled directly in production, sandbox testing is still strongly recommended.

Please feel free to raise feedback and issues via the Github Issues page here.

Packaged Release History

You can install a packaged version of the tool into your production org (sandbox testing as always recommended). Check the limatations and known issues above first! If you are a developer obtain the source code from this repository if you wish to develop it further and/or contribute to it. Click Deploy to Salesforce to deploy the source code to your developer org.

Latest Version 1.6 - Spring'14 Release - 9th February 2014

Package Install URL

  • Enhancements to support Schedule mode, Calculate historic records, Developer API and more, see here.
  • Fix for Issue 10
  • Fix for Issue 11

Version 1.5

Package Install URL

  • Fix for Issue 7 and Issue 8, relating to failure to report test execution errors in production org.

Version 1.4

  • Fix for Issue 3, relating to issue when deleting last child record not updating rollup fields to 0.

Version 1.3

  • Fix for Issue 2, relating to error 'purgeOnDelete option can only be used on a non-active org'

Version 1.2

  • Support for Realtime calculations
  • Validation of valid fields and field types on Declarative Rollup definition fields
  • Optimisation during update of child records to only apply rollup when field to aggregate changes
  • More extensive unit tests, also those around use of limits such as queries, rows etc.

Version Beta 6

  • Support for Realtime calculations
  • Limited validation on Declarative Rollup definition fields
  • Limited testing on multiple lookups
  • Fixed issue with multiple lookups

About

Declarative Rollup Summaries for Lookups


Languages

Language:Apex 100.0%