Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trigger MasterRecipeTrigger on Recipe__c (
- before insert, after insert,
- before update, after update,
- before delete, after delete) {
- if (Trigger.isBefore) {
- if (Trigger.isInsert) {
- //pass in Trigger.new to the RecipeClass and the handleBeforeInsertUpdate method
- RecipeClass.handleBeforeInsertUpdate(Trigger.new);
- }
- if (Trigger.isUpdate) {
- //pass in Trigger.new to the RecipeClass and the handleBeforeInsertUpdate method
- RecipeClass.handleBeforeInsertUpdate(Trigger.new);
- }
- if (Trigger.isDelete) {
- //call class logic here
- }
- }
- if (Trigger.isAfter) {
- if (Trigger.isInsert) {
- //call class logic here
- }
- if (Trigger.isUpdate) {
- //call class logic here
- }
- if (Trigger.isDelete) {
- //call class logic here
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement