+ Start a Discussion
sfdclearnsfdclearn 

Filter Criteria in a Roll up summary Field

We have a Roll Up Summary field in the Account level that calculates SUM(Opportunity)  with the following filter criteria.

 

  1.       Stage equals  Closed/Won,Implementation.

 

  I would like to add another filter criteria here which is 

 

   2. Product not equal to 'test'

 

  In this scenario product is a related list to opportunity as its not a field i don't think i can add this filter criteria there.

 

But i am just wondering if there is anyother ways to do this like creating any formula field or something.

 

Please advise.

 

Thanks!

Saikishore Reddy AengareddySaikishore Reddy Aengareddy

You can create a trigger on opportunitylineitem and you can create a text field on opportunity and populate this text field on opportunity with name of the products (seperated by semicolon or comma)  when ever lineitem is created.

 

Then you can create a rollup summary field on account and add filter condition like productname contains/doesnotcontain to calculate the required count/sum/max... 

 

Thanks, Sam