0

Currently we are having (Opportunities(won)last 12 months) field which is of Roll-up summary data type , updating the count in this field on criteria when

Close date of opportunity >= (some date).

There is no way to give Value as TODAY or any inbuilt value. Instead of roll-up summary type can we use formula based field to count the closed won opportunity in account and update the field.

If possible could you please provide us the formula..

Thanks,

Chithra

4

Using a formula field to count related records is not possible.

You have a few options:

  1. Trigger to roll up in real time
  2. Batch job to perform rollup
  3. DLRS Package (Declarative Lookup Roll Up Summary)

Option 3 being the quickest route but be aware there were/are issues with some bulk operation with too many SOQL queries. Not sure if it is still there or not. For most cases it works well.

Or Option 4:

  1. Create a Checkbox field to indicate if in the last 12 months
  2. Create a WFR to update the checkbox field to true or false based on the formula field
  3. Create a batch job that sets the value of the checkbox daily
  4. Use the checkbox as the criteria of the rollup summary

Option 3 is still the fastest but those are your options AFAIK

  • How to use DLRS package? Can u explain on this. – Chithra Rengasamy Aug 17 '16 at 14:26
  • Try a google search. info is easily found. (Along with videos etc) – Eric Aug 17 '16 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.