Tag: trigger
-
Trigger to Post Automated Random Chatter Comment
Apex Trigger to post an automated random comment whenever a chatter post is published. When any user posts to chatter and if the user’s post contains the term “Success”, an automated comment should be posted. This comment should be randomly selected from a list of comments; And should be posted as a specific user.
-
Trigger to Roll Up (Summary) Contacts field to Accounts
Trigger to Roll Up (Summary) Contacts field to Accounts. The Total Salary field should hold the sum of Salaries from its associated Contacts. The trigger should work whenever a Contact’s Salary is updated, New Contact is Created or when an existing Contact is deleted. Get a List of Accounts that needs to be updated. 1.…