What are your thoughts on using a combination of
workflow + trigger versus running all logic through a
trigger. The reason I bring it up is I'm undertaking a massive trigger cleanup in a new org I took over, and am running into a few "workflows causing triggers to run twice" issues.
Am I best off implementing the
public static Boolean isFirstRun method, or simply putting all logic into a trigger?
I'm wondering on two levels:
- Simplicity (it's obviously more difficult to write/test/push triggers than it is to write a simple workflow rule, but it's also simpler to do everything in one giant beforeUpdate trigger where you can control order of execution, etc with more granularity)
- Time (is it fast to have one single all-encompassing trigger as opposed to forcing salesforce to work "trigger, then workflows, then re-trigger"?)
Thoughts on best practice?
I know salesforce states that the more "point-and-click" you can make your app, the better (and I can do some of that via Custom Labels and Custom Settings read via the trigger), but I'm no stranger to triggers, so it doesn't scare me to be fully reliant on them...