Studio
A local web UI for browsing and editing your NetSuite data.
SuitePortal Studio is a local web application for exploring your NetSuite schema, browsing records, editing data, and running raw SuiteQL queries — all from your browser.
Launching Studio
npx suiteportal studioStudio starts a local server on port 4480 and opens your browser automatically.
Options
| Flag | Description |
|---|---|
--port 3000 | Use a custom port |
--no-open | Don't auto-open the browser |
npx suiteportal studio --port 3000 --no-openStudio requires a valid .env with NetSuite credentials and a .suiteportal/schema.json from a previous introspect run.
Records Tab
The default view. The left sidebar lists all record types from your schema, grouped into Standard and Custom records. Click a record type to browse its data.
Browsing Records
When you select a record type, Studio fetches the first 50 rows with auto-selected columns. It reads the queryable flag from your schema to avoid selecting fields that would cause SuiteQL errors.
Filtering
The filter bar lets you build where clauses visually. Supported operators:
| Operator | Description |
|---|---|
equals | Exact match |
not | Not equal |
gt / gte | Greater than (or equal) |
lt / lte | Less than (or equal) |
contains | Substring match |
startsWith | Prefix match |
Filters appear as removable chips. Adding a filter immediately re-fetches the data.
Sorting
Click any column header to sort. Click again to reverse direction. Sorting indicators (↑ / ↓) show the active sort.
Column Selection
The Columns dropdown lets you toggle which fields are visible in the table. Studio auto-selects a reasonable default set of columns based on the record's schema.
Pagination
Records are fetched in pages of 50. The pagination bar shows total count and provides First / Prev / Next / Last controls.
Editing Records
Click any row to open the record detail modal. From here you can:
- Edit — Modify field values and click Save Changes. Read-only fields are disabled. Only changed fields are sent in the update.
- Delete — Click the delete button, then confirm. The record is permanently removed via the REST API.
Creating Records
Click the Create button above the data table. The create dialog shows all writable fields, with required fields sorted first. Empty values are stripped before sending.
Query Tab
Switch to the Query tab in the sidebar for a raw SuiteQL editor. Write any valid SuiteQL and press Run (or Ctrl+Enter) to execute.
SELECT id, companyname, email
FROM customer
WHERE isinactive = 'F'
FETCH FIRST 25 ROWS ONLYResults are displayed in a table below the editor with execution time.
API Endpoints
Studio exposes a REST API that the frontend consumes. You can also call these directly.
Schema
| Method | Endpoint | Description |
|---|---|---|
GET | /api/schema | List all record types with field/relation counts |
GET | /api/schema/:type | Full record definition (fields, relations, sublists) |
Records
| Method | Endpoint | Description |
|---|---|---|
GET | /api/records/:type | Fetch records with where, select, orderBy, take, skip query params |
GET | /api/records/:type/count | Count records matching an optional where clause |
POST | /api/records/:type | Create a record |
PATCH | /api/records/:type/:id | Update a record |
DELETE | /api/records/:type/:id | Delete a record |
Query
| Method | Endpoint | Description |
|---|---|---|
POST | /api/query | Execute raw SuiteQL. Body: {"sql": "SELECT ..."} |
Example
# Fetch first 10 customers
curl http://localhost:4480/api/records/customer?take=10
# Run raw SuiteQL
curl -X POST http://localhost:4480/api/query \
-H "Content-Type: application/json" \
-d '{"sql": "SELECT id, companyname FROM customer FETCH FIRST 5 ROWS ONLY"}'Error Handling
Studio maps NetSuite errors to standard HTTP responses:
| Error | HTTP Status |
|---|---|
| Authentication failure | 401 |
| Rate limit exceeded | 429 |
| Request timeout | 504 |
| SuiteQL / REST error | Derived from NetSuite response |
If a record query fails with a 400 (non-queryable field in SELECT), Studio automatically retries with a minimal column set.