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
E LE L 

Need help making trigger

Hi,

I am not new to salesforce but I am to apex. Can anyone help me make trigger.

The object is named Object1
This object needs to get a sum of hours in the Hours field in all records in another object (Object2) that is non-master detail to it so I can not use a roll up field.
Once it has the sum, put the sum in Total Hours field which is on Object1.
How to set this up?

Thanks
KevinPKevinP
avoid using a trigger. Instead checkout this article, and use Andy's app:
http://andyinthecloud.com/2013/07/07/new-tool-declarative-rollups-for-lookups/ (http://andyinthecloud.com/2013/07/07/new-tool-declarative-rollups-for-lookups/" target="_blank)