Loading

How to Interpret Data Retrieved from a SOQL Query

Date de publication: Aug 22, 2025
Description

Once you have your SOQL query, you may follow these steps to leverage the query for your investigation:

 

UI:

  1. Go to Setup from the Setup Menu.

  2. In the main Quick Find box, search for "Object Manager" and select it.

  3. Once in the Object Manager, use the Quick Find box within the Object Manager to type the object in question.

    • Important Note: Do not include underscores (_) or the __c suffix. For example, "Account__c" should be searched as "Account".

  4. Click the object name to access its details.

        5. Here, you can review the object's details and schema to understand its contents.

 

CLI:
You may also recreate the SOQL queries by doing the following:

 

  1. Authenticate to your Salesforce Org:

    • Run the following command in your terminal. This command will open a web browser for you to log into your Salesforce organization.

    • sf org login web --alias myorg

    • Tip: You can replace --alias myorg with a different alias to easily identify your org.

  2. Execute Your SOQL Query:

    • Once authenticated, you can run your SOQL query. Replace the example query "SELECT Id, Name, Account.Name FROM Contact" with your specific SOQL query after --query.

    • sf data query --query "SELECT Id, Name, Account.Name FROM Contact"

    • This command will execute the specified SOQL query against your authenticated org and display the results in your terminal

 

Reference:

 

https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_data_commands_unified.htm#cli_reference_data_query_unified

 

https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm#sfdx_setup_install_cli_macos

Numéro d’article de la base de connaissances

005132577

 
Chargement
Salesforce Help | Article