Activity Forums Salesforce® Discussions How do I pass a list in SOQL query in salesforce?

  • Mansi

    Member
    March 23, 2021 at 4:12 pm

    List<Account> accountList = [SELECT Id
    FROM Account
    WHERE BillingCity='Pune'];

  • RABINDRA

    Member
    March 25, 2021 at 5:19 pm

    List<String> phoneList =new List<String>();
    phoneList.add('1234567891');
    phoneList.add('6789112345');
    List<Contact> contacts =[ select id,LastName,FirstName from Contact where Phone in : phoneList ];

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos