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
aaryansriaaryansri 

Event Activities and task Activities should automatically add to related list of another object

Hi All

           I need a help to write a trigger for update the Activite to  People object in the related list.The person selected in the field Assigned to (lookup to User, std field) matches the peoplekey  of that new lookup to People. Actually, the lookup to people should remain in the backend and be updated automatically every time the Assigned To changes. In other words, we’ll need to:
To find a match to the User Assigned To among the records in People object, and put that matching record into the new lookup.


ShashankShashank (Salesforce Developers) 
Please try to write a trigger on your own and post here if you are specifically stuck somewhere. Or please provide a detailed description with all the necessary information, as detailed as possible.