function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sridhar BonagiriSridhar Bonagiri 

How to find the values in trigger.old

I need help in finding out  whether trigger.old has got values or not.

 

Best Answer chosen by Admin (Salesforce Developers) 
Cool_DevloperCool_Devloper

Trigger.old is basically a map of old values.

To get them, you need to specify the ID as index and retrieve whatever field value you want. It's like-

"Trigger.oldMap.get(ID).value"

Cool_D

All Answers

Cool_DevloperCool_Devloper

Trigger.old is basically a map of old values.

To get them, you need to specify the ID as index and retrieve whatever field value you want. It's like-

"Trigger.oldMap.get(ID).value"

Cool_D

This was selected as the best answer
Sridhar BonagiriSridhar Bonagiri

Thanks Cool_D it solved my problem.