What is a Trigger Architecture?
A trigger architecture is essentially the framework (also commonly referred to as pattern, template, foundation, and/or factory) for how triggers are organized and executed within an instance.
Any good architecture will address the following:
- One trigger per object
- Order of execution
- Separation of concerns
- Considers recursion
- Have a clean readable structure
- (+) Ability to toggle triggers off
For more information, consult Salesforce’s view on trigger framework best practices.
What if we have existing code in our instance?
You can leverage Trigger Architecture for new triggers and support a mixed approach of traditional Triggers & Trigger Architecture without any issues. Gears can also provide an estimate to re-work your current triggers in order to leverage Trigger Architecture for your existing code base.
How is your approach different from Table Driven Trigger Management (TDTM?)
Table Driven Trigger Management is part of the Salesforce Nonprofit Starter Pack (NPSP) and provides a method for managing your code in nonprofit orgs. Similar to GearsCRM Trigger Architecture, TDTM enforces one trigger per object, allows basic debugging, and uses configuration elements to control trigger actions and order of execution.
However, GearsCRM Trigger Architecture can be applied to any Custom or Standard Object that supports triggers, where TDTM only applies to a limited number of standard objects. Our approach offers additional advantages such as increased debugging functionality, recursion protection and the ability to toggle methods on and off in real time with configuration – without the need for a deployment.
What happens after the initial engagement with Gears?
You retain the Trigger Architecture managed package and all of Gears’ code. Additionally, you will have end user and developer documentation to assist with the transition and any future development efforts.
What if we have multiple development teams?
A solid Trigger Architecture helps reduce issues encountered by multiple development teams working within the same code. Full documentation is provided to assist your development teams, and your System Admins will now have visibility into the different teams’ interactions – without having to know how to read code.
To get started with Trigger Architecture today, view our documentation and download the package.