Qus:    What are the trigger context variables?
Jul 31, 2021 04:15 1 Answers Views: 412 SHIVA
Prev Next
Answers (1)
DILEEP Aug 02, 2021 02:33
Answer:   To capture the runtime information we use trigger context variables.

Below context variables will return either true or false.

Trigger.isBefore – returns true if the trigger context is Before Mode
Trigger.isAfter – returns true if the trigger context is After Mode
Trigger.isInsert – returns true if the trigger context is Insert
Trigger.isUpdate – returns true if the trigger context is Update
Trigger.isDelete – returns true if the trigger context is Delete
Trigger.isUndelete – returns true if the trigger context is Undelete
Trigger.isExecuting – returns true if the apex class method is getting call from Apex Trigger
Below context variables will store records at runtime.

trigger.old – stores history (old versions) of the records
trigger.oldMap – stores history (old versions) of the records along with id
trigger.new – stores new version of the records
trigger.newMap – stores new version of the records along with id

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect