Closed scottmcclung closed 9 years ago
Try reading this blog post: http://andyinthecloud.com/2014/06/28/financialforce-apex-common-updates/
You'll want to focus on the trigger state portion.
Thanks @tmowbrey could reference i forgot about that post! :+1:
@scottmcclung Does this help?
@scottmcclung Let me know if you need more help figure this out. :+1:
After reading Andrew's book and blog articles I'm ready to dive in, but still trying to wrap my head around everything.
Up until now, I've been following the trigger pattern that Dan Appleman talks about in his Advanced Apex Programming book. A feature of his pattern is the ability to control how downstream trigger events, caused by DML in the initial trigger, are handled. (Advanced Apex Programming pgs 126-132) As I plan to update my code to use enterprise patterns, I'm not sure how to implement that same behavior.
Can you explain the program flow in the fflib_SObjectDomain.triggerHandler method. Specifically, what is it doing with TriggerStateByClass and how should we be using TriggerStateEnabled? How do we manage the downstream trigger events?