Activity Forums Salesforce® Discussions What is Trigger.old and when do you normally use it?

  • Suraj

    Member
    April 21, 2017 at 2:13 pm

    Hi Manpreet,

    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(before update and before delete).

  • Saurabh

    Member
    April 21, 2017 at 2:26 pm

    Hi Manpreet

    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.

    We normally use it when we :

    Need to check if any field is update in the DML Activity then do another update, like if account name gets changed then update related opportunity name

    Hope it may helps

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos