Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

SuiteQL Tool (v2025.6)

image

SuiteQL Tool: The Single-File NetSuite Database IDE

A standalone, zero-dependency Suitelet that transforms NetSuite into a fully functional SQL IDE, complete with real-time Data Manipulation (DML) capabilities.

The Developer Problem

NetSuite natively lacks a direct SQL console. To query the database, developers must rely on rigid Saved Searches, or write, deploy, and execute temporary SuiteScripts. To update or delete records in bulk, they are forced to build Mass Updates or Map/Reduce scripts. This creates massive friction, slows down debugging, and clutters the environment with single-use code.

The Architectural Solution

SuiteQL-Tool is a complete, single-file IDE injected directly into the NetSuite UI. It utilizes the N/query module for lightning-fast reads and features a custom-built translation engine that parses standard SQL DML operations and maps them to N/record API calls.

This means you can write standard UPDATE or DELETE statements, and the tool will execute them safely within NetSuite's application layer.

System Architecture Highlights:

  • Zero-Dependency Deployment: A single Suitelet file (suiteql-tool-sl.js). No messy bundles, no external dependencies, and no complex deployment steps.
  • The DML Translation Engine (v2025.6): Standard SuiteQL is read-only. This tool features a custom Regex parser that intercepts INSERT, UPDATE, DELETE, and CREATE statements. It translates these SQL commands into record.create(), record.submitFields(), and record.delete() operations.
  • Application-Layer Safety: Because DML is routed through the N/record module rather than direct database writes, all NetSuite business logic, User Event scripts, and Workflows still trigger properly.
  • Hardcoded Failsafes: Destructive DDL commands like DROP and TRUNCATE are explicitly blocked by the parser to prevent catastrophic data loss.

Core Features

  • CodeMirror Integration: Full syntax highlighting, auto-completion (Ctrl+Space), and quick-execution shortcuts (Ctrl+Enter).
  • Live Data Dictionary: Built-in "Tables Reference" window that dynamically queries the N/recordCatalog API, allowing you to instantly view table schemas, column names, and data types without leaving the IDE.
  • Query Libraries: Save and load your most-used queries locally to the NetSuite File Cabinet, or pull from a remote JSON index for team-wide query sharing.
  • Intelligent Pagination & Export: Handles datasets exceeding the 5,000-row limit through automated pagination loops. Export results instantly to CSV, JSON, or beautifully rendered HTML tables.
  • Workbook Extraction: Instantly load the underlying SuiteQL query from any existing NetSuite Workbook or Saved Search.

Execution Examples

Standard Read (SuiteQL):

SELECT ID, LastName, FirstName, Email FROM Employee WHERE isinactive = 'F'

About

SuiteQL Tool - A DML Tool created for NetSuite.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages