Activity Forums Salesforce® Discussions Can we put the apex class in map as key and value?

  • Can we put the apex class in map as key and value?

  • Naman

    Member
    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

    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

Viewing 1 - 2 of 2 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos