function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
trigger AccountTrigger on Account(Before Insert, before update, before delete, after insert, after update,after delete,after undelete){ If(Trigger.Isinsert && Trigger.Isbefore){ //run the logic } If(Trigger.IsUpdate && Trigger.Isbefore){ //run the logic } If(Trigger.IsDelete && Trigger.Isbefore){ //run the logic } If(Trigger.Isinsert && Trigger.IsAfter){ //run the logic } If(Trigger.IsUpdate && Trigger.IsAfter){ //run the logic } If(Trigger.IsDelete && Trigger.IsAfter){ //run the logic } If(Trigger.undelete && Trigger.IsAfter){ //run the logic } }
trigger LeadTrigger on Lead (before insert, before update, before delete, after insert, after update, after delete, after undelete) { if(trigger.isBefore && trigger.isInsert){ system.debug('Before Insert:'); system.debug('trigger.new: '+trigger.new); system.debug('trigger.newmap: '+trigger.newMap); system.debug('trigger.old: '+trigger.old); system.debug('trigger.oldMap: '+trigger.oldMap); } if(trigger.isAfter && trigger.isInsert){ system.debug('After Insert:'); system.debug('trigger.new: '+trigger.new); system.debug('trigger.newmap: '+trigger.newMap); system.debug('trigger.old: '+trigger.old); system.debug('trigger.oldMap: '+trigger.oldMap); } if(trigger.isBefore && trigger.isUpdate){ system.debug('Before Update:'); system.debug('trigger.new: '+trigger.new); system.debug('trigger.newmap: '+trigger.newMap); system.debug('trigger.old: '+trigger.old); system.debug('trigger.oldMap: '+trigger.oldMap); } if(trigger.isAfter && trigger.isUpdate){ system.debug('After Update:'); system.debug('trigger.new: '+trigger.new); system.debug('trigger.newmap: '+trigger.newMap); system.debug('trigger.old: '+trigger.old); system.debug('trigger.oldMap: '+trigger.oldMap); } if(trigger.isBefore && trigger.isDelete){ system.debug('Before Delete:'); system.debug('trigger.new: '+trigger.new); system.debug('trigger.newmap: '+trigger.newMap); system.debug('trigger.old: '+trigger.old); system.debug('trigger.oldMap: '+trigger.oldMap); } if(trigger.isAfter && trigger.isDelete){ system.debug('After Delete:'); system.debug('trigger.new: '+trigger.new); system.debug('trigger.newmap: '+trigger.newMap); system.debug('trigger.old: '+trigger.old); system.debug('trigger.oldMap: '+trigger.oldMap); } if(trigger.isAfter && trigger.isUndelete){ system.debug('After Undelete:'); system.debug('trigger.new: '+trigger.new); system.debug('trigger.newmap: '+trigger.newMap); system.debug('trigger.old: '+trigger.old); system.debug('trigger.oldMap: '+trigger.oldMap); } }
Can you explain more about your issue?
Thanks!!
If this helps, Please mark it as best answer.
Thanks!!
Use this below code; you will get to know which context variables fire on which vocations of events.
If this is helpful, please mark it as the best answer.
Thanks,
Tabrez