+ Start a Discussion

Query on trigger.new


What is the difference between trigger.new and trigger.old and when to use which one.


The documentation is available here : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_context_variables.htm


The short version is trigger.old contains the old version of the objects while trigger.new contains the new versions.  you can use these to determine what changes have been made when a record is updated.