Thursday, July 7, 2016

Salesforce Trigger Context Variables

Variable

 Operators

isExecuting

 Returns true if the current context for the Apex code is a trigger only

isInsert

 Returns true if this trigger was fired due to an insert operation

isUpdate

 Returns true if this trigger was fired due to an update operation

isDelete

 Returns true if this trigger was fired due to a delete operation

isBefore

 Returns true if this trigger was fired before any record was saved

isAfter

 Returns true if this trigger was fired after all records were saved

isUndelete

 Returns true if this trigger was fired after a record was recovered from the Recycle Bin

new

 Returns a list of the new versions of the sObject records.(This sObject list is available only in insert and update triggers. The included records can be modified only in before triggers.)

newMap

 A map of IDs to the new versions of the sObject records. (Only available in before update, after insert, and after update triggers.)

old

 Returns a list of the old versions of the sObject records. (Only available in update and delete triggers.)

oldMap

 A map of IDs to the old versions of the sObject records. (Only available in update and delete triggers.)

size

 The total number of records in a trigger invocation, both old and new.

 

No comments:

Post a Comment