Created
March 21, 2021 20:56
-
-
Save niavesper/1d498e33669147bf545dc01cc8f98a86 to your computer and use it in GitHub Desktop.
LeadTrigger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger LeadTrigger on Lead (after insert, after update) { | |
switch on Trigger.operationType { | |
when AFTER_INSERT{ | |
LeadHandler.handleAfterInsert(trigger.new); | |
} | |
when AFTER_UPDATE{ | |
LeadHandler.handleAfterUpdate(trigger.new, trigger.oldMap); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wow, I love the switch/case on your trigger! 🥇