Activity Forums Salesforce® Discussions How do we create a SOQL query in Salesforce?

  • MOHIT

    Member
    May 13, 2020 at 3:11 pm

    To use the Query Builder to query Salesforce data
    Select Tools | Query Builder | Query Builder.
    Drag tables (Salesforce objects) from the Object Explorer to the Diagram pane. Existing relationships display.
    Note: You cannot create new relationships when building a Salesforce SOQL query.
    If a pair of tables (objects) has more than one relationship, choose one relationship and remove the others.
    To add additional existing relationships, add multiple instances of a table.
    To restore a dropped relationship between tables, right-click the child table and select Restore FK.
    Select the columns (Salesforce fields) you want to add to the query. For more information, see Build Queries Visually.
    To use a SOQL date range function, select a date column and click in the Where field for that column. Then select a date range from the Date Range tab of the Where Condition dialog.
    Click Execute SQL to run the query.

  • Pooja

    Member
    May 13, 2020 at 3:39 pm

    Select Tools | Query Builder | Query Builder.
    Drag tables (Salesforce objects) from the Object Explorer to the Diagram pane. Existing relationships display.
    Note: You cannot create new relationships when building a Salesforce SOQL query.
    If a pair of tables (objects) has more than one relationship, choose one relationship and remove the others.
    To add additional existing relationships, add multiple instances of a table.
    To restore a dropped relationship between tables, right-click the child table and select Restore FK.
    Select the columns (Salesforce fields) you want to add to the query. For more information, see Build Queries Visually.
    To use a SOQL date range function, select a date column and click in the Where field for that column. Then select a date range from the Date Range tab of the Where Condition dialog.
    Click Execute SQL to run the query.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos