Activity › Forums › Salesforce® Discussions › How to copy from one map to another map in Salesforce? Salesforce® Discussions How to copy from one map to another map in Salesforce? Posted by Deepak on June 24, 2020 at 3:50 PM How to copy from one map to another map in Salesforce? Aditya replied 5 years, 11 months ago 2 Members · 1 Reply 1 Reply Aditya Member June 24, 2020 at 4:24 PM Map<Integer, String> m1 = new Map<Integer, String>(); m1.put(1, ‘First item’); m1.put(2, ‘Second item’); Map<Integer, String> m2 = new Map<Integer, String>(m1); // The map elements of m2 are copied from m1 System.debug(m2); Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me