You need data, fast!
Whether it's exporting a csv or answering a question, SOQL can get you the result much faster than creating a Salesforce report.
My top 3 reasons to use SOQL are:
If you're not familiar with these tools, I highly recommend to check them out. But if you'd like to get started with something familiar, Workbench has a nice SOQL interface.
Pro-tip with Workbench: If you set a browser bookmark after your query runs, you can return to that bookmark and it will re-run your query!
There are many other ways to run SOQL queries including from the Salesforce Developer Console or any number of tools that have been built by 3rd party vendors.
![]() |
Anyone can SOQL! |
My top 3 reasons to use SOQL are:
- Get data fast
- Get answers fast
- Flexible access
Get Data Fast
How often do you find yourself making a throwaway report to check what is happening in the system? For example, you updated your Lead routing and want to see if it's been assigning Leads as you expect. Well you could make a report, run it and review the results. Or you could run a SOQL query.
The benefits of running a SOQL query in this case is that you can retrieve different data sets much quicker. In a Salesforce report, you are stuck with the Report Type you selected when creating the report. With SOQL, you can traverse object relationships in a much more natural way.
Get Answers Fast
Have you ever been in a meeting and someone asks a data question that no one has the answer to? Well SOQL comes in handy here because you can run a quick query and get the answer, fast!
Plus, you look like a real Salesforce wiz 😎
Flexible Access
I primarily use 2 different tools to execute SOQL queries:- SFDX Command Line Interface via the sfdx force:data:soql:query command
- Illuminated Cloud execute anonymous SOQL Query interface
If you're not familiar with these tools, I highly recommend to check them out. But if you'd like to get started with something familiar, Workbench has a nice SOQL interface.
Pro-tip with Workbench: If you set a browser bookmark after your query runs, you can return to that bookmark and it will re-run your query!
There are many other ways to run SOQL queries including from the Salesforce Developer Console or any number of tools that have been built by 3rd party vendors.
How to Getting Started?
If SOQL is new to you, check out Write SOQL Queries on Trailhead
If you've done some SQL in the past, check out Move from SQL to SOQL on Trailhead
If you'd like to run SOQL from the command line, check out my post on SOQL from the Command Line
Comments
Post a Comment