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
MohiniMohini 

Need help with average at opportunity

Scenario :    opportunity (primary)
                     Sub opportunity(master detailed with primary
                      Product (mater detailed with sub oppty)
Product object revenue and cost sum is  rolling  up at sub opportunity and the probability is  getting averaged for product at sub opportunity object. Product  has product type IS and OS.
I need your help here … at the opportunity object  if there are 2  sub opportunity records  with IS product types then further rollup for revenue , cost and probability  at primary opportunity will be averaged. Same for OS.. if there are more than 1 sub opportunity at opportunity object  the revenue , cost and probability  rollups will be averaged.The IS and OS  sub opportunity will always be added
 for revenue and cost and Probability will be averaged.ut 
Below  table is an example to make you undertand. Please help me.with the developments to achieve this . 



User-added image
PriyaPriya (Salesforce Developers) 

Hey Meera,

Try to develop the Trigger for this requirement.

Thanks,

Priya Ranjan

MohiniMohini
Hi priya can you stop replying to my post ... u r not helping .., please refrain from posting instructions here .. i need help here