hi i am new in salesforce, i want to achieve roll up summary functionality through trigger, please help me and i want to count no of child record associated to parent, and update a field of parent object which hold no of child record associated with that
Please check once below code it will count the number of contacts on account record.
Trigger on contact object :
Related class :
I hope it helps you.
If it helps you please mark it as the best answer in case of any other assistance please feel free to contact me.
Thanks
Varaprasad