What problem does it solve?
Centralizes trigger logic and prevents common failure modes in Salesforce Apex triggers such as recursion, uncontrolled side-effects, and scattered business logic across multiple triggers, making triggers predictable and maintainable during development, refactoring, and data migrations.
Core Features & Use Cases
- Pragmatic TriggerHandler Pattern: A dependency-free base class with context-aware routing, bypass registry, and execution depth control to avoid recursion.
- FFLIB Domain Layer Support: Guidance for adopting fflib_SObjectDomain patterns where the org uses Apex Commons.
- TDTM / CMDT Dispatcher: Table-driven registration of handlers using Custom Metadata for runtime enable/disable and ordered execution.
- Bypass & Migration Strategies: Static, framework-level, and declarative bypass options for migrations and bulk data loads plus a migration checklist for converting bare triggers to handler-based frameworks.
- Recursion Prevention & Testing: Static processed-id sets and depth counters, with testing notes on static variable lifetime and example test patterns.
Quick Start
Analyze the Account trigger and provide a migration plan to a handler-based framework including bypass and recursion controls.