function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
luccilucci 

Map requiremen

I have Two maps ,how can i merge these maps and display as 1map.

map<id,id>

map<id,id>

how to get 1 map,pls anybody help me

 thanks 

laks

hitesh90hitesh90

Hi,

 

you can use map method putall to create only one map.

Map Methods in Salesforce

 

see below example.

map<id,id> map1 = new map<id,id>();
map<id,id> map2 = new map<id,id>();
map1.putall(map2);

 

 

Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Advanced Administrator & Sales cloud consultant
My Blog:- http://mrjavascript.blogspot.in/