adspace


Explain the difference between trigger.new and trigger.newmap?

Answer Posted / Yudhisthir Naik

'trigger.new' is a collection of all the records that are being inserted or updated in the current context. It contains all the new or changed records that will be processed by the Apex trigger. On the other hand, 'trigger.newMap' is a Map data type (specifically, a List<SObject> Map) where each key is the record ID and the value is the record itself from 'trigger.new'. This allows for easier access to individual records.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is workflow rule and workflow actions? : salesforce workflows and approval process

574


What were you doing before sfdc development?

522