Trigger Context Variables chart for better understanding of their use.
Trigger Context Variables Matrix (Trigger.) |
isInsert | isUpdate | isDelete | isUndelete | |||
---|---|---|---|---|---|---|---|
isBefore | isAfter | isBefore | isAfter | isBefore | isAfter | isAfter | |
new | true | true | true | true | false | false | true |
old | false | false | true | true | true | true | false |
newMap | false | true | true | true | false | false | true |
oldMap | false | false | true | true | true | true | false |
true: represents that we can use variable in the trigger
false: represents that the context variable can not be used.
For eg: for Before Insert, we can not use Trigger.old