Activity › Forums › Salesforce® Discussions › How to convert List to a map? Salesforce® Discussions How to convert List to a map? Posted by Ayush on September 11, 2020 at 9:31 AM How to convert List to a map? Shweta replied 5 years, 8 months ago 2 Members · 1 Reply 1 Reply Shweta Member September 11, 2020 at 2:35 PM Assume you have, List<Account> accList and you want to convert this list into a map. Create a map and pass this list. Example: Map<Id, Account> accMap = new Map<Id, Account>(accList); Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me