Following are the usages of trigger context variables,
Trigger.new > for the operations of before insert/update we can use this.
Trigger.old > for the old operations like after update/delete we go for this.
Trigger.newMap > A map of IDs to the new operations of the sObject records. Note that this map is only available in before update, after insert, and after update triggers.
Trigger.oldMap > A map of IDs to the old versions of the sObject records. Note that this map is only available in update and delete triggers.
Hope so this helps you...!
Please mark this answer a Solution and please give kudos by clicking on the star icon, if you found this answer as helpful.
Simply put Trigger.new is the new or updated object, Trigger.old is the object before the update (or possibly delete) and the Map versions are in the case of the trigger firing on a collection of objects.
Following are the usages of trigger context variables,
Trigger.new > for the operations of before insert/update we can use this.
Trigger.old > for the old operations like after update/delete we go for this.
Trigger.newMap > A map of IDs to the new operations of the sObject records. Note that this map is only available in before update, after insert, and after update triggers.
Trigger.oldMap > A map of IDs to the old versions of the sObject records. Note that this map is only available in update and delete triggers.
Hope so this helps you...!
Please mark this answer a Solution and please give kudos by clicking on the star icon, if you found this answer as helpful.
Hi,
Following are the usages of trigger context variables,
Trigger.new > for the operations of before insert/update we can use this.
Trigger.old > for the old operations like after update/delete we go for this.
Trigger.newMap > A map of IDs to the new operations of the sObject records.
Note that this map is only available in before update, after insert, and after update triggers.
Trigger.oldMap > A map of IDs to the old versions of the sObject records.
Note that this map is only available in update and delete triggers.
Hope so this helps you...!
Please mark this answer a Solution and please give kudos by clicking on the star icon, if you found this answer as helpful.
All Answers
Hi,
There are some details here
Simply put Trigger.new is the new or updated object, Trigger.old is the object before the update (or possibly delete) and the Map versions are in the case of the trigger firing on a collection of objects.
Regards,
Stefan
Hi,
Following are the usages of trigger context variables,
Trigger.new > for the operations of before insert/update we can use this.
Trigger.old > for the old operations like after update/delete we go for this.
Trigger.newMap > A map of IDs to the new operations of the sObject records.
Note that this map is only available in before update, after insert, and after update triggers.
Trigger.oldMap > A map of IDs to the old versions of the sObject records.
Note that this map is only available in update and delete triggers.
Hope so this helps you...!
Please mark this answer a Solution and please give kudos by clicking on the star icon, if you found this answer as helpful.