Activity › Forums › Salesforce® Discussions › Can we put the apex class in map as key and value? Tagged: Key Value, Map, Salesforce Apex, Salesforce Apex Class, Salesforce SOQL Salesforce® Discussions Can we put the apex class in map as key and value? Posted by Naman on April 14, 2016 at 9:20 AM Can we put the apex class in map as key and value? If yes, please help on that? Utsav replied 9 years, 11 months ago 2 Members · 1 Reply Key ValueMapSalesforce ApexSalesforce Apex ClassSalesforce SOQL 1 Reply Utsav Member June 9, 2016 at 12:39 PM Hi Naman Yes you can put an instance of apex class in salesforce maps. i try the following code and it doesnot gives an error to me: public class help{ map<DarkJedi, integer> testMap; public help(){ testMap = new map<DarkJedi, integer>(); } } Here DarkJedi is an apex class stored in my salesforce org. Hope it helps Thanks Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me