Trigger.newmap & trigger.oldmap

Where we use (trigger events) trigger.newmap & trigger.oldmap?

newMap
A map of IDs to the new versions of the sObject records.
Note that this map is only available in before update, after insert, and after update triggers.

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.

Published by Sandeep Kumar

He is a Salesforce Certified Application Architect having 11+ years of experience in Salesforce.

Leave a Reply