Activity Forums Salesforce® Discussions How to get Maps from SOQL Query in Salesforce?

  • krati

    Member
    January 28, 2020 at 1:39 pm

    Hi Marziya,

    You can create a map the following way by using SOQL query:

    Map<Id, Account> mapAcc = new Map<Id, Account>([SELECT Id, Name FROM Account ]);

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos