May 2019
Intermediate to advanced
546 pages
12h 41m
English
This returns a list with the new version of the records. This variable returns a list of sObjects, so if you want to use properties of the specific object type (such as Account), you need to cast your list to a list from the specific object. This variable is only available in the following contexts:
List<Account> lstAccounts = (List<Account>) Trigger.new; // the list // 'SObject' is casted to a list with 'Account' records
You can modify the records in this list only in a before context, not in an after context.
Read now
Unlock full access