Tag Archives: trigger

Prevent an Apex Trigger from executing twice

I came across an issue recently whereby the following conditions were met: An after update trigger was updating based on some Trigger.old != Trigger.new (a specific value had changed) A workflow ran The same after update trigger executed, because Trigger.old … Continue reading

Tagged , , | 9 Comments

Salesforce Trigger: When to use Before versus After

When creating a trigger in Salesforce, you need to decide whether you want actions to occur before or after, as in before insert, before update, before delete versus after insert, after update, after delete. The Apex documentation actually has a … Continue reading

Tagged , , , | 14 Comments