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
Developer.mikie.Apex.StudentDeveloper.mikie.Apex.Student 

How to create a trigger handler class and the advantages to doing so. Please help

Hey there,

I have begun coming into problems with my triggers on the same object and I was told that a trigger handler class may be the answer to these. Would someone perhaps be able to guide me through how to write one and the negative and positive effects of doing so. thank you in advanced for your time
Best Answer chosen by Developer.mikie.Apex.Student
MagulanDuraipandianMagulanDuraipandian
http://www.infallibletechie.com/2014/05/trigger-handler-controller-in-salesforce.html

If this solves your problem, kindly mark it as the best answer.
Hit Like, if it saved your work :-)

Regards,
Magulan
http://www.infallibletechie.com

All Answers

Ramu_SFDCRamu_SFDC
The following post gives you a better picture of what trigger handler is and how to write one.
https://developer.salesforce.com/forums/ForumsMain?id=906F000000093cKIAQ

Please review the below article which explains completely about the best practices and patterns to use while coding triggers with examples

http://developer.force.com/cookbook/recipe/trigger-pattern-for-tidy-streamlined-bulkified-triggers

Developer.mikie.Apex.StudentDeveloper.mikie.Apex.Student
Thank you for your reply hwoever, I have read these posts many many times and I fail to understand and implement them each time. Is it possible to get an example of separate triggers formed into a handler classs?
MagulanDuraipandianMagulanDuraipandian
http://www.infallibletechie.com/2014/05/trigger-handler-controller-in-salesforce.html

If this solves your problem, kindly mark it as the best answer.
Hit Like, if it saved your work :-)

Regards,
Magulan
http://www.infallibletechie.com
This was selected as the best answer
Developer.mikie.Apex.StudentDeveloper.mikie.Apex.Student
I still dont understand how I would take my triggers and convert them into one trigger with a handler class. Would you perhaps be able to give me an example of this. Thank you for your time.