Activity Forums Salesforce® Discussions What is meant by Handler class for trigger in Salesforce?

  • Manish

    Member
    March 16, 2020 at 1:02 pm

    a trigger handler is the starting point to 'handle' complex logic set into a trigger. Creating a class defined as MyObjectTriggerHandler can help to design a modular set of reusable objects which manage all the operations to be done by a trigger.

  • Clinto

    Member
    March 16, 2020 at 2:43 pm

    Mainly we use TriggerHandler to manage events like before update , before insert, etc . write one more class called TriggerHelper , in this classs we write methods to implement logic like when one field is updated do this do that, etc .
    The important point in writing all these classes is to keep one trigger for one object and avoid conditions like recursive calls etc.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos