Salesforce Fact #578 | putAll() method in map

There is a method named putAll() in Map Class in Apex. It has two variations.

Suppose, we already have a number of sobject records in the map. Now if we want to add further sobject records from the another list of records, we can use the putAll() method instead of iterating over the sobject list.

Reference: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_map.htm#apex_System_Map_putAll

Attached is the screenshot.



Comments

Popular posts from this blog