sf-trigger-framework

Public
On this page

    Minimal trigger framework for Salesforce: one trigger per object, handler interface, per-object bypass, recursion guard. No dependencies.

    Why another trigger framework

    Most frameworks solve org-scale problems with library-scale complexity. This one is four classes: a handler interface, a dispatcher, a bypass registry, and a recursion guard keyed on record Ids — read all of it in ten minutes.

    Install

    Deploy the four classes, create one trigger per object that calls TriggerDispatcher.run(new AccountTriggerHandler()), and delete your old triggers one at a time as their logic moves into handlers.

    Design notes

    The recursion guard tracks processed Ids per event, not a global boolean — batch two of a 400-record update still runs. Bypass is per-object and logged, because silent bypasses become permanent bypasses.