Activity › Forums › Salesforce® Discussions › How can I use map to store record from dynamic query? Tagged: Dynamic SOQL, Salesforce Query, Salesforce Records, SOQL Salesforce® Discussions How can I use map to store record from dynamic query? Posted by Ajay Prakash on April 30, 2016 at 5:24 PM How can I use the map to store record from a dynamic query? Thanks Gourav replied 9 years, 11 months ago 2 Members · 1 Reply Dynamic SOQLSalesforce QuerySalesforce RecordsSOQL 1 Reply Gourav Member May 30, 2016 at 11:51 AM Yes, We have to store map.KeySet or map.values() in either list/set and then use that set and list over there. Because , we can use variable and collection in dynamic SOQL and map.keySet() / map.values() are the method of collection type(map). Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me