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
Siva Anand 19Siva Anand 19 

Account to opportunity roll up summary

I have a question regarding the rollup of Opportunities to Account. As well all know Rollup summaries work only on MD relaionships. The relationship between Account and opportunites is a Look-Up relationship. I am able to create a Rollup summary on Account to count no. of opprtunities through this functionality. Dont undertand how this happens. Is Account to Opportunity anything speacial?
Alain CabonAlain Cabon
Hi,

Yes, there are few exceptions for the Look-Up relationships between standard objects.

Create roll-up summary fields on:
  • Any custom object that is on the master side of a master-detail relationship
  • Any standard object that is on the master side of a master-detail relationship with a custom object
  • Opportunities using the values of opportunity products related to the opportunity
  • Accounts using the values of related opportunities
  • Campaigns using campaign member status or the values of campaign member custom fields
https://help.salesforce.com/articleView?id=fields_about_roll_up_summary_fields.htm&type=0

but you cannot count the contacts related to an account with a Rollup summary (and many people don't understand the exception for the opportunities only):

https://success.salesforce.com/ideaView?id=08730000000BpFHAA0

Regards
Don the Admin VéronDon the Admin Véron
Plus, you can create a roll-up summary field on : 
 - standard object "Order" using the value of "Order products" related records, even there is no MD relationship, but just a lookup relationship