Trigger.operationtype context variable

Trigger.operationType is a context variable that can be used to identify the context of the trigger(before/after) and (insert/update/delete/undelete). Generally, we check the trigger context as the code given below:


Now using the trigger.operation type variable, the code looks more clean and easy to understand the code logic. 



Comments

Popular Posts