Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. trigger MasterRecipeTrigger on Recipe__c (
  2. before insert, after insert,
  3. before update, after update,
  4. before delete, after delete) {
  5.  
  6. if (Trigger.isBefore) {
  7. if (Trigger.isInsert) {
  8. //pass in Trigger.new to the RecipeClass and the handleBeforeInsertUpdate method
  9. RecipeClass.handleBeforeInsertUpdate(Trigger.new);
  10. }
  11. if (Trigger.isUpdate) {
  12. //pass in Trigger.new to the RecipeClass and the handleBeforeInsertUpdate method
  13. RecipeClass.handleBeforeInsertUpdate(Trigger.new);
  14. }
  15. if (Trigger.isDelete) {
  16. //call class logic here
  17. }
  18. }
  19. if (Trigger.isAfter) {
  20. if (Trigger.isInsert) {
  21. //call class logic here
  22. }
  23. if (Trigger.isUpdate) {
  24. //call class logic here
  25. }
  26. if (Trigger.isDelete) {
  27. //call class logic here
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement