As most of you already know, we should use a trigger framework in order to manage properly the logic that is executed after we create, update or delete a record by using Apex. The main reason is that we cannot control the order of execution of the different triggers that we can have per object.
There are a lot of frameworks available that we can re-use, my favourite ones are as follows:
- Kevin O’Hara published in 2014 a good framework with a nice bypass feature, but we need to know what we do when use that feature.
- Chris Aldridge created a simple framework that contains all what we need and I have used it several times
- Tony Scott also published another framework that we can use.
It’s up to you to choose one of these or other frameworks or you can create your own framework, but definitely you must use one!