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
dev_forcedev_force 

Question about "Trigger Context Variables"

Is it possible for more than one of these variables to be true within a single invocation of a trigger?

 

Trigger.isInsert

Trigger.isUpdate

Trigger.isDelete

Trigger.isUndelete

 

Best Answer chosen by Admin (Salesforce Developers) 
aalbertaalbert

No, a given operation will invoke the trigger so therefore it will only be insert OR update OR Delete OR Undelete.

Those context variables enable you to identify the different operations within the same trigger.