Workspace Tab

🔍 SOQL Builder Guide

What It Does

SOQL Builder is a professional-grade query tool for Salesforce Object Query Language (SOQL). Write queries visually with an interactive form or directly in the text editor, then execute them and explore results in a high-performance virtualized table. Built for analysts, admins, and developers who need to quickly query, analyze, and modify Salesforce data.

The result table handles 1000+ rows and 50+ columns without lag, with features like column pinning, per-column filtering, global search, inline editing, and relationship navigation. Pop results into a separate window, export to multiple formats, and collapse the editor to maximize screen space.

Perfect for: Data audits, migration prep, record validation, bulk edits, relationship discovery, and interactive data exploration.

How to Access

Open the TrackForcePro workspace and click the SOQL tab. The object selector loads your org's SObjects automatically. You're ready to start building or editing queries.

Object Selector

The searchable combobox replaces traditional dropdowns for faster, more intuitive object selection. Type an object name and the list narrows with real-time substring matching — perfect when your org has 200+ custom objects.

Keyboard Controls

  • Type to Filter — Start typing "Account", "Case", or any object name. Matching objects appear with search terms highlighted.
  • Arrow Keys — Navigate the dropdown using Up and Down arrows.
  • Enter — Select the highlighted object and populate the FROM clause.
  • Escape — Close the dropdown without selecting.

Selecting an object automatically updates the query builder's FROM clause and triggers intelligent field suggestions based on that object's schema.

Visual SOQL Builder

The form-based builder provides guided, step-by-step query construction with smart field suggestions at every stage. Each section corresponds to a SOQL clause:

Core Clauses

  • SELECT Fields — Add specific fields you want to retrieve. The builder suggests available fields in real time as you type. Supports both simple fields and relationship dot-notation (e.g., Account.Name).
  • FROM Object — Your primary object, set via the object selector. Switch objects only if you need to query a different SObject type.
  • WHERE Conditions — Build filter logic with guided field selection, operators (=, !=, >, <, LIKE, IN, NOT IN, etc.), and value inputs. Add multiple conditions with AND/OR logic.
  • ORDER BY — Sort results by field name and direction (ASC or DESC). Useful for sorting by creation date, name, or custom fields.
  • LIMIT — Maximum rows to return (1–2000, per Salesforce API limits). Always test with a LIMIT before running queries on large datasets.
  • OFFSET — Skip the first N rows. Combined with LIMIT, enables pagination for result sets exceeding 2000 rows.

Smart Suggestions: The suggestion engine understands context — it knows what clause you're editing and suggests only valid fields, operators, and syntax for that context.

Text Editor Mode

Write or paste raw SOQL directly into the full-featured code editor. Switch between visual builder mode and text editor mode at any time — the builder intelligently parses your syntax to keep both views in sync.

Editor Features

  • Syntax Highlighting — SOQL keywords, field names, and operators are color-coded for easy reading and validation.
  • Bracket Matching — Automatic bracket pair detection and highlighting. Hover over or select a bracket to see its pair.
  • Auto-Indentation — Proper indentation is maintained as you type complex nested queries.
  • Line Numbers — Reference specific lines when discussing queries or debugging syntax errors.
  • Collapse Toggle — After execution, collapse the editor to maximize space for your result table.

Tip: Copy queries from Salesforce DevConsole and paste them here. The builder recognizes the syntax and you're ready to execute.

Executing Queries

Execute your query against your Salesforce org using either method:

  • Click the Run button at the top of the editor pane.
  • Press Ctrl+Enter (Windows/Linux) or Cmd+Enter (macOS).

SOQL Builder validates your query syntax before sending it to Salesforce. If there are syntax errors, you'll see a clear message pointing to the problem. Once executed, results stream into the virtualized result table below.

Pro tip: Always test queries with a LIMIT 10 clause first. This lets you verify syntax and see a sample of results before pulling thousands of rows.

High-Performance Result Table

Results render in a virtualized table engine optimized for scale. Only visible rows are rendered in the DOM, enabling smooth performance even with 1000+ rows and 50+ columns. The table reuses DOM nodes as you scroll, keeping memory usage constant.

Density Modes

Optimize row height for your workflow. Choose from the Density dropdown:

  • Normal — 38px rows, default comfortable spacing. Best for initial exploration.
  • Compact — 26px rows, efficient layout. Recommended for scanning 500+ row datasets.
  • Dense — 20px rows, maximum density. Use when you need to see 100+ rows at once without scrolling.

Column Controls

  • Sticky Header — Column headers always visible while scrolling vertically.
  • Sticky First Column — ID column (or your chosen first column) pinned on the left while scrolling right through data columns.
  • Column Pinning — Pin up to 3 additional columns to always keep key fields visible. Right-click a column header to pin/unpin.
  • Column Resizing — Drag the right edge of any column header to resize. Widths persist during your session.
  • Column Sorting — Click a column header to sort by that field (ascending first, then descending). A visual indicator shows the current sort direction and column.
  • Per-Column Filtering — Click the Filter button in the toolbar to reveal filter inputs below each column header. Type a value to show only rows matching that column.

Search & Row Selection

  • Global Search — Use the Global Search field in the toolbar to find text across all visible cells. Matching text highlights in the table for quick visual scanning.
  • Row Checkboxes — Select rows using checkboxes in the first column. Useful for identifying a subset of records for reference or bulk operations.
  • Keyboard Navigation — Arrow keys move between cells; Enter toggles row selection; Escape clears selection. Efficient for power users.

Smart View Mode

Toggle Smart View to auto-hide columns that are entirely empty or contain only null values. This dramatically simplifies wide result sets (30+ columns) by removing visual clutter and focusing on fields with actual data.

Result Toolbar

A 30px compact icon toolbar sits above the results with these controls:

Control What It Does
View Mode Toggle between Table (formatted) and Raw (JSON) views.
Density Dropdown to select row height: Normal, Compact, or Dense.
Smart View Toggle to hide empty/null columns.
Filter Toggle per-column filter inputs. Badge shows count of hidden columns.
Inline Edit Toggle double-click inline editing for updateable fields (if enabled per-org).
Global Search Expandable search input. Type to highlight matches across all cells.
Export Dropdown menu: copy as JSON/CSV/TSV or download as file.
Full-Screen Expand table to fill the workspace, hiding tabs and sidebars.
Focus Mode Hide the toolbar itself, maximizing table space.
Pop-Out Open results in a separate browser window with full feature parity.
Collapse Editor Toggle to show/hide the SOQL query editor above the table.

Inline Field Editing

Edit updateable fields directly in the result table without navigating to a record page. This is especially useful for bulk corrections, migrating data, or testing field logic.

Enabling & Using Inline Edit

  • Check Org Permissions — Inline editing is disabled by default for production orgs as a safety measure. Enable it in Settings > Org Management if your org allows edits.
  • Toggle in Toolbar — Click the Inline Edit button in the result toolbar to activate edit mode for the current result set.
  • Double-Click to Edit — Double-click any updateable field to enter edit mode. The cell transforms into an appropriate input.
  • Field-Aware Inputs — Text fields show text inputs; boolean fields show True/False dropdowns; text areas appear for large text fields.
  • Save or Cancel — Press Enter to save (uses Salesforce REST API PATCH), or Escape to discard changes.

Important: Inline edits apply immediately to Salesforce. There is no batch confirmation, so be careful when editing large result sets. A tooltip warning appears when inline editing is disabled for your org.

Pop-Out Results Window

Click the Pop-Out button in the result toolbar to open your results in a separate, independent browser window. This is essential for side-by-side comparison or analyzing results while building a follow-up query.

Pop-Out Features

  • Full Feature Parity — The pop-out window has every table feature (density modes, sorting, column pinning, filtering, global search, inline edit, export) as the main tab.
  • Independent State — The pop-out maintains its own table configuration. Changes in the main tab don't affect the pop-out, and vice versa.
  • Side-by-Side Comparison — Run a second query in the main tab while keeping your first result set visible in the pop-out window. Perfect for comparing datasets or validating migrations.
  • Reference While Building — Keep a pop-out of your result set visible while editing your next query in the main workspace.

Workflow: Run your first query, pop out the results, then modify your query or run a different one in the main tab. Switch between windows to compare or analyze patterns.

Tips, Tricks & Best Practices

Query Writing

  • Start with LIMIT 10 — Always validate syntax on small result sets first. This catches typos and schema issues before you accidentally query millions of rows.
  • Use Relationship Fields — Include dot-notation fields (e.g., Account.Name, Owner.Email) to navigate relationships directly from the table without separate queries.
  • Test Complex WHERE Clauses — Build WHERE logic in the visual builder first, then switch to text editor to review and refine the generated syntax.

Table Navigation & Analysis

  • Smart View for Wide Datasets — Toggle Smart View when you have 30+ columns with sparse data. It hides empty columns and focus your attention on fields with actual values.
  • Pin Key Columns — Pin the ID column plus 2–3 key fields. As you scroll right to explore other columns, your key identifiers stay visible.
  • Column Sorting for Patterns — Sort by a field to group similar values together. Useful for auditing (e.g., sort by Status to see all closed vs. open records).
  • Global Search for Validation — Use global search to quickly find specific values across the entire result set, even in columns you haven't pinned.

Performance & Export

  • Dense Mode for Large Sets — When working with 5000+ row results, switch to Dense density mode. Fewer pixels per row = faster rendering and smoother scrolling.
  • Export Filtered Results — Apply filters or global search to narrow your result set, then export as CSV for Excel, Sheets, or your reporting tool. Much cleaner than exporting everything.
  • Pop-Out for Reference — Keep a pop-out window of your results open while you build a second query or validate data in another system.

Keyboard Shortcuts

  • Ctrl+Enter (Windows) / Cmd+Enter (Mac) — Run the current query instantly.
  • Arrow Keys — Navigate cells in the table without using your mouse.
  • Escape — Cancel inline edits, close dropdowns, or clear row selection.
💡 Pro Tip: For audits or bulk corrections, combine filtered results with inline editing. Filter the table to show only records matching your criteria, enable inline edit, double-click cells to correct them in batch, and press Enter to save each change. Much faster than Salesforce's UI.