Activity Forums Salesforce® Discussions how-to-retrieve-data-from-multiple-objects-in-salesforce-with-one-query

  • how-to-retrieve-data-from-multiple-objects-in-salesforce-with-one-query

  • Joe Dias

    October 20, 2016 at 7:27 am

    How to retrieve data from multiple objects in one query? If 2 objects are related and other if they are not.

  • Ajit

    October 20, 2016 at 12:10 pm

    Hey Joe,

    If want to query records on multiple object in a single query then you have to use SOSL rather then SOQL query.


    eg :

    FIND {"Joe Smith" OR "Joe Smythe"}
    IN Name Fields
    RETURNING lead(name, phone), contact(name, phone)

    but you can not perform DML operation.

Viewing 1 - 2 of 2 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos