function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gringoesegringoese 

Roll-Up under Accounts tab, need Opportunity Product field

 

I am trying to make a Roll-Up field under the Accounts tab that sum a Opportunity Products field, but I only see an option for Opportunity fields. An example of what I'd like to is show a Roll-Up field that shows the total number of widgets sold (Opportunity Products - Quantity ) that fall under a certain catergory ( Opportunity Products - Opportunity Product Category (custom field)). How can I do this?

 

*werewolf**werewolf*

You'd have to make 2 rollups, one from Opportunity Product to Opportunity, and the second from Opportunity to Account.  I'm not entirely sure you can do that actually, but that's how you would do it.

gringoesegringoese

I tried it and using 2 Roll-ups does work. It's a shame though that this seems to be the only way to do it given that you get a limited amount of roll-ups. The standard Opportunity Quantity field which is like a built-in Roll-up field would almost work if I could apply filters from the Opportunity Product level to it. 

 

If anyone knows of another way to do this without burning 2 Roll-ups I'd love to hear it. 

*werewolf**werewolf*

Well you could do it with an Apex trigger also, but rollups are probably more manageable.  If you think about it, though, it really does warrent 2 rollups -- you are rolling up data from a grandchild object to its grandparent.