Tuesday, January 21, 2014

What is the difference between trigger.new and trigger.old in Apex – SFDC

What is the difference between trigger.new and trigger.old in Apex – SFDC

Trigger.new :
Returns a list of the new versions of the sObject records.
Note that this sObject list is only available in insert and update triggers, and the records can only be modified in beforetriggers.

Trigger.old :
Returns a list of the old versions of the sObject records.
Note that this sObject list is only available in update and delete triggers.


No comments:

Post a Comment