The SOQL Tool is a lightweight tool that allows for permitted users to execute SOQL queries and REST endpoints directly within their Salesforce application. It allows for users who do not have access to the Developer Console to perform such queries, and has additional features beyond what the standard Developer Console provides. It's also built with native Lightning components, so users can use the tool without needing to go through third party websites or install browser extensions.
Users will need the SOQL Tool - Full Access
permission set in order to access the tool. If it's desired for a user to not be able to use the REST Explorer API, assign them the SOQL Tool - SOQL Access (No REST)
permission set instead.
The tool can be accessed by searching for SOQL Tool
in the app launcher (or going to https://{mysalesforcedomain}.lightning.force.com/lightning/n/SOQL_Tool
).
If preferred, there is a detached version of the tool that can be accessed from https://{mysalesforcedomain}.lightning.force.com/c/soql.app
Users can enter the following types of queries to search records in their instance. Note that traditional sharing rules and permissions are applied, so users will not be able to see records or fields they don't have access to:
- Traditional SOQL Queries - Enter any standard SOQL query or use
SELECT *
to select all fields of an object. - Describe Queries - Enter
DESC ObjectName
to retrieve schema information about the specified object. - Salesforce IDs - Enter the Salesforce record ID to retrieve all fields for that record.
- Limits - Enter
LIMITS
to retrieve the list of all org-wide limits and their current usage.
Use the REST tab to send any type of REST query (GET/POST/PATCH/PUT/DELETE
) to the instance. This can be helpful for experimenting with the standard Salesforce REST API or for testing custom Apex REST Web Services.
The SOQL Tool Settings
(SOQLTool_Settings__c
) custom setting allows configuring the following:
-
Logging (
Is_Log_Enabled__c
): If this setting is enabled, this tool logs queries in theSOQL_Log__c
custom object. Enabling logging provides some additional features (sharable url and recent queries). -
SOQL Limit Warning (
Limit_Warning_Threshold__c
): A warning message is displayed if the query specifies a limit higher than a defined threshold. The default threshold value is100
. It can be overridden by updating this setting. Enter0
for no warning to ever appear. -
Recent Queries (
Max_Recent_Queries__c
): If logging is enabled, the Recent Queries tab displays the50
most recent queries executed using this tool by default. It allows users to select a previous query to execute again. The number of queries displayed can be overridden by updating this setting.
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.