Trail Map โ€บ Use-Case Catalog โ€บ Developer Console
๐Ÿ–ฅ๏ธ Power Tools ยท For Developers & Admins

Developer Console: Debug Your Data Without Waiting on IT

Run a quick query, add a test record, or write a small script to fix data โ€” all safely limited to your own company's data. You never need raw access to the database itself. Heads up: parts of this trail involve writing simple code, so it leans more technical than most.

4
Tabs
~15 min
Time to Complete
80 pts
Available
1 Badge
Platform Developer

Why admins need a safe way to poke at the data

RS
Ravi Shah ยท Implementation Partner

"A client says a lead's status looks wrong. I don't want to file a support ticket and wait two days. I just want to look at the record right now, and maybe fix three bad rows myself."

Every CRM eventually needs someone to check what's actually stored, add a one-off test record, or run a small script to fix a handful of records. Without a safe tool for this, admins have two bad options.

Either they bother a developer for every small task, or someone reaches for direct access to the raw database. That second option is risky. This CRM serves many companies from one shared system, so a mistake with direct database access could touch the wrong company's records.

๐Ÿ’ก
What you'll be able to do
Admins and developers get a self-serve way to inspect and fix data in minutes โ€” no raw database connection, and no risk of touching another company's records.

Four tabs, one safety rule

The Developer Console is an Admin-only tool with four tabs. Every one of them is locked to your own company's data. There's no mode that lets you see or touch another customer's records.

SQL QuerySQL is the language used to ask a database for data. This tab is read-only, meaning it only allows SELECT statements โ€” queries that look at data, never ones that change it. Any query touching a shared data table must filter to your own company's ID, and can't use tricks like JOIN, UNION, or subqueries that might leak another customer's rows.
Insert RecordPaste in a JSON field map โ€” a simple list of field names and values โ€” and create a record the same way the app itself would. Required fields, Validation Rules, and automations all still run.
Execute ScriptWrite a short script, in a programming language called Groovy, using the built-in CRM object (CRM.insert, CRM.update, CRM.delete, CRM.query, CRM.getRecord). It never runs raw SQL. Every call goes through the same guarded service the app itself uses, so a script can only ever see or change your own company's records.
Saved ScriptsSave a script once, and re-run it whenever you need it โ€” or have it run automatically from a Workflow Rule's "Execute Script" action. Every save, run, and deactivation is written to the Audit Log, a record of who did what and when.
โœ…
Not a database backdoor
Scripts and queries here are guarded the same way the CRM's own API is โ€” they can only read and write data your company already owns. Every run is also capped, with a short time limit and a limit on how many records one script can change, so a runaway script can't hang the whole system.

1 Inspect a record, then fix it with a script

Open the Developer ConsoleGo to Developer Console in the admin area.
Run a safe SQL queryIn the SQL Query tab, try one of the example queries. Notice it only ever returns rows that belong to your own company.
Try a script, then save itIn Execute Script, run the "Query & Update" example. Then save it as a Saved Script, so a Workflow Rule could call it automatically later.

Day-to-day: admins and implementation partners

Investigate a reported data issueRun a SELECT query to see exactly what's stored, instead of guessing from what's shown on screen.
Fix a handful of bad recordsUse Insert Record or a short script instead of filing a ticket and waiting on a developer.
Reuse a fix laterSave any script you write more than once as a Saved Script โ€” or wire it into a Workflow Rule so it runs automatically.
๐ŸŽฏ
What to try next
Look at the Custom Classes & Pages trail โ€” it uses the same scripting concept to power whole custom screens, not just one-off fixes.

Test what you learned

1. Can a script or SQL query in the Developer Console read another company's data?
No โ€” every query and script is scoped to your own company's data only
Yes, it's a raw SQL console with full database access
2. What kind of SQL is allowed in the SQL Query tab?
Only SELECT statements, and only against your own company's rows
Any statement, including INSERT, UPDATE, or DELETE