Activity › Forums › Salesforce® Discussions › Can we take key and value both as ID datatype in Map in Salesforce? Salesforce® Discussions Can we take key and value both as ID datatype in Map in Salesforce? Posted by Aditya on January 24, 2020 at 4:15 PM Can we take key and value both as ID datatype in Map in Salesforce? Pooja replied 6 years, 4 months ago 2 Members · 1 Reply 1 Reply Pooja Member January 24, 2020 at 4:26 PM Yes, we can take key and value both as ID datatype in Map in Salesforce because Maps can hold sObjects both in their keys and values. Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me