Activity Forums Salesforce® Discussions What is Handler Class in Salesforce?

  • Aditya

    Member
    January 27, 2020 at 2:54 pm

    Trigger handlers (not sure if what code you posted you want to keep) "enforce a logical sequence to the trigger code and in turn help to keep code tidy and more maintainable. Keeping trigger logic for each object in a single place avoids problems where multiple triggers are in contention with each other and makes it easier to debug."

  • Ayush

    Member
    January 27, 2020 at 4:58 pm

    A handler is basically a message queue. You post a message to it, and it will eventually process it by calling its run method and passing the message to it. Since these run calls will always occur in the order of messages received on the same thread, it allows you to serialize events

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos