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
WhyteSpyderWhyteSpyder 

Update Parent opportunity with sum of total amounts in all child opportunities

Hi. We have Parent opportunities that could have multible child opportunities. We are trying to sum the values of product costs form the child opportunities related to that parent ooportunitiy only if it was not lost. The filed name in child is tool_cost_c, the parent name is tool_cost_parent.

please advice.

 
Balaji BondarBalaji Bondar
Hi WhyteSpyder, 
You have to write a trigger on Opportunity to calculate the sum the values of product costs form the child opportunities related to that parent ooportunitiy and update that parent ooportunitiy

Refer below link :
https://www.sundoginteractive.com/blog/rollup-summary-with-a-lookup-field-salesforce
Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.