Activity Forums Salesforce® Discussions Can we use list of Map in Salesforce?

  • Anuj

    Member
    June 25, 2020 at 1:33 pm

    Yes, We can use here's the Example ---

    List <Map<String, Integer>> a = new List <Map<String, Integer>> {
    new Map<String, Integer>{'p1'=>10, 'p2'=>10},
    new Map<String, Integer>{'p1'=>20, 'p2'=>20}
    };

  • Marziya

    Member
    June 25, 2020 at 1:39 pm

    Yes We Can.

  • Kirandeep

    Member
    June 25, 2020 at 2:51 pm

    Yes we can use list of map in Salesforce
    for example
    List<Map<Id,Account> listofMap = new List<Map<Id,Account>>();

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos