An effort to bring a revolution in Salesforce.

Tuesday, 26 July 2016

difference between trigger.old and trigger.oldmap

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

Trigger.oldMap: A map of IDs to the old versions of the sObject records.Note that this map is only available in the update and delete triggers.

Let say  you have a custom object Account.

Trigger.old&nbsp;means it is a&nbsp;List<Account>

Trigger.oldMap&nbsp;means it is a&nbsp;map<Id,Account>

No comments:

Post a Comment

Get Gmail, Docs, Drive, and Calendar for business