Skip to main content

Posts

Showing posts from August, 2020

Introduction to "Tiger" - a simple Salesforce trigger framework

It is often tricky when it comes to automations around Salesforce DMLs. There are various tools of building automations in Salesforce including workflow rules, process builders, flows and apex triggers. Overall, apex trigger is the most difficult tool to use which requires deep coding knowledge, while on the flip side of the coin, it is the most powerful tool which enables things that with other tools are impossible or not elegant. However the challenges of doing apex triggers are not trivial though: The order of triggers' execution is not guaranteed (so is workflow rules, process builders and flows). It is the developer's job to control the execution if the order matters. Recursive execution - triggers are executed twice when there are workflows, flows or process builders that have field updates on the same SObject. Trigger executions could be recursive till timeout if there are inappropriate DMLs in the code. ...