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
Francesca Ribezzi 2Francesca Ribezzi 2 

issues with self lookup - getting child records of parent

Hi everyone,

I need to get the sum of all the child records associated with the parent. So, for each parent I need to get the sum of its children.
Mine is a custom object with a self lookup with the parent Id (and this is where the problems begin!!). 
How can I do this? I would rather not use triggers or lots of queries.. 
Thanks a lot for your help! 

Cheers
Francesca