5

I have a formula field Broker_value__c on opportunity product which is a currency field. I need a sum of this field for opportunities closed today in my opportunities.

I also created a formula field in opp products to see if the opportunity is closed today or not as a boolean and was trying to use this field in the roll up summary as filter criteria. But i am unable to get this formula field in the filter criteria of the roll up summary.

Any ideas on how we can get the sum of broker_value on opportunities for opps closed today?

4 Answers 4

8

It will only work if the formula field will refer fields of same object. You can find your solution to this at here : http://web.archive.org/web/20160425152533/http://blog.wdcigroup.net/2012/07/salesforce-tips-roll-up-summary-with-formula-fields/

5

Rather than using formula for field Broker_value__c, you could use regular number/currency field in combination with workflow field update (workflow rule set to update the field upon record update). Having regular (non-formula) field might make it easier for you to use it in the roll up summary.

As for the inability to use boolean formula field as the criteria in the roll up summary, here's what SFDC help doc says about roll-up summary fields:

Roll-up summary fields can calculate the values of formula fields if they do not contain cross-object field references or functions that automatically derive values on the fly, such as NOW or TODAY.

Maybe you could consider setting the value of the boolean field via workflow field update, too. That way you could use it in the roll-up summary criteria also.

2

You cant reference formula field in roll-up field filter criteria.

Can't you create after update trigger on opportunity which will calculate those value if opportunity is closed?

1

I needed a roll-up field that summarized data from two child objects that referenced a field from the parent object.

Solution:

  1. Create Process Builder that updates child object reference field when the reference field is updated
  2. Create Process Builder that updates child object reference field when child object 1 is created
  3. Create Process Builder that updates child object reference field when child object 2 is created

Very tedious, but it works.

You must log in to answer this question.

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