I am trying to create a roll up summary field on the lead object that looks up to activity object and counts the number of activities that are not closed. But for some reasons it cannot do that, because the lead object is not the master of a master detail relationship. Are there any alternatives to this? A formula field perhaps?

1 Answer 1


The Declarative Lookup Rollup Summary Tool (dlrs for short) is the workaround that you're looking for.

It was originally created by Andrew Fawcett, but control was given to the Salesforce.org Open Source Commons program a few years ago.

It accomplishes that using triggers and/or async apex, but it manages those for you (as well as creating the required unit tests).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .