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
ashoknaglikar1.3945534997003162E12ashoknaglikar1.3945534997003162E12 

Update grand parent with avg value of grand child records

Hi I have a situation. 

I have a database where we have following relationship Student (grand parents ) --> (look up )year ( parent) --> (master detail ) subject marks  (grand child).

Relation ship fields can't be changed to any other type . 
I need to update avg marks for every subjects on to respective student records as and when mark records added or modified . 

I have tried creating a  a roll up summary on the year object to calculate the total marks and used a trigger to populate the avg on the student record as the roll up summary fields are calculated at the end . So it's not working as expected any suggestions . 
 
EldonEldon
Hi Ashok

Do you want to get average of all the marks of all the years to the student record? .  And where did you write your trgger code? please share your trigger

Regards