Skip to main content
We have added a product category field to our products... Now on the opportunity, I'd like to create SUM fields that subtotal the products so we can see the breakdown of product category that leads to the total amount.  So, for example, if we have product categories of:

 

Consulting

 

Email

 

Web

 

And we have a few products within each of those categories on the opportunity, I'd like the sum of the total price to go to a field called "Consulting Total" and "Email Total" and "Web Total", etc.    
5 risposte
  1. 10 dic 2016, 15:31

    Adriana, 

     

    You are correct. The reason why you don't see the formula text field as criteria when creating the rollup is that a rollup cannot reference a formula field which spans one or more cross objects. So this is what you need to do:

     

    1. Get rid of the Product Category formula field.

     

    2. Create a new custom text field that is populated using either Process builder or a Workflow Rule and Field Update. The formula for field update will be same as what you used for the formula field earlier.

     

    3. Now use this field in the Roll Up Summary calculation at the Opportunity level.

     

    Also note that since processes don't work retroactively, you will have to mass update existing records using data loader in order for your process to fire across them and update the custom Product Category field. Once you have done all of this, you can use the Product Category custom field in the rollup summary field criteria.

     

    I know it's a lot more legwork compared to having a simple formula field but unfortunately the latter won't work for a rollup summary field.

     

    Similar questions:

     

    https://success.salesforce.com/answers?id=90630000000D4AgAAK

     

    https://success.salesforce.com/answers?id=90630000000wm6xAAA
0/9000