NetSuite – JS Snippets ReloadSuiteScript 2.x productivity for VS Code — snippets, smart autocomplete, hover help, and lightweight validation while you write NetSuite JavaScript. Works in any Why use this extension?NetSuite customization in VS Code often means repeating the same boilerplate: JSDoc headers,
SnippetsFull script scaffoldsType the prefix and accept the suggestion (Tab) to insert a complete starting file:
Entry-point snippetsIndividual handlers when you already have a script shell, for example:
Pattern snippets (daily API work)
NetSuite-style samples (forms, Map/Reduce word count, etc.) are included for learning and adaptation. AutocompleteSuggestions appear while you type in JavaScript files (trigger-friendly on
|
| Area | Examples |
|---|---|
| Scripts | New template, parameters block, wrap in define(), validate file |
| Fields | Reload custom fields, create example config |
| 2.1 | Audit workspace, convert current file or workspace |
| SuiteQL | New query file, extract/insert, create schema example |
| SuiteCloud | Validate, deploy (optional validate first), upload, create project, account setup, import object/file |
| SDF / upload workflow | Open related script object, copy script for manual upload, open script record URL template |
| AI (local-first) | Copy sanitized context; Developer Assistant setup in terminal (no API keys stored) |
| Intelligence | Add N/* import, go to custom field definition, scaffold Jest test |
Right-click in JavaScript for wrap, validate, parameters, 2.1 convert, and SuiteQL extract. Right-click in SuiteQL for insert-as-N/query.
SuiteCloud commands require a workspace folder containing suitecloud.config.js or manifest.xml, and the SuiteCloud CLI on your PATH (or set netsuite.suitecloudPath).
Custom field autocomplete
Copy resources/netsuite-fields.example.json to .vscode/netsuite-fields.json in your project and list your account field IDs:
{
"fields": ["custbody_global_field"],
"customFields": {
"customer": ["custentity_my_flag"],
"salesorder": ["custbody_po_number"]
}
}
While typing fieldId: '...', sublistFieldId: '...', or search name: '...', matching IDs are suggested. When the file references record.Type.CUSTOMER (or similar), suggestions prefer fields for that record type.
Change the config path with netsuite.customFieldsPath. With netsuite.sdfFieldDiscovery enabled (default), field IDs from SDF custom field objects in your SuiteCloud project are merged automatically.
Settings
| Setting | Default | Description |
|---|---|---|
netsuite.defaultApiVersion |
2.1 |
Default API version for generated templates |
netsuite.defaultModuleScope |
SameAccount |
Default module scope for generated templates |
netsuite.enableDiagnostics |
true |
Show SuiteScript validation in JavaScript files |
netsuite.enableGovernanceDiagnostics |
true |
Governance usage hints in JavaScript files |
netsuite.customFieldsPath |
.vscode/netsuite-fields.json |
Custom field ID config for autocomplete |
netsuite.sdfFieldDiscovery |
true |
Merge field IDs from SDF Objects XML |
netsuite.suiteqlSchemaPath |
.vscode/netsuite-suiteql-schema.json |
Optional SuiteQL schema overrides |
netsuite.suitecloudPath |
suitecloud |
SuiteCloud CLI executable for deploy/validate/upload |
netsuite.suitecloudValidateBeforeDeploy |
true |
Run validate before deploy |
netsuite.scriptRecordUrlTemplate |
(empty) | Browser URL template with {scriptId} placeholder |
Search “netsuite” in VS Code Settings.
Rate this extension
If NetSuite – JS Snippets Reload saves you time, a quick rating on the Visual Studio Marketplace helps other NetSuite developers discover it and supports continued updates.
Leave a rating or review on the Marketplace
Thank you — feedback and reviews are very much appreciated.
Privacy (rating reminder)
The extension may occasionally show a non-intrusive prompt asking you to rate it after real use (for example, several JavaScript sessions over time, or a couple of sessions after an update). You can Rate now, Later, or Don't ask again. This uses only VS Code local extension storage — no telemetry or external tracking.
Requirements
- Visual Studio Code 1.85+ (language model tools are optional and feature-detected)
- JavaScript files (SuiteScript 2.x) and optional
.suiteqlfiles
Source and history
- Repository: github.com/AlexandreD3v/ns-js-snippets_reload
- Snippet scaffolds were initially generated from snippetGenerator / JSSnippets
For contributors
Snippets live in snippets/snippets.code-snippets. Autocomplete, hover, and diagnostics share JSON under data/ and providers under src/. Optional MCP stub: mcp/server.js.
Package a VSIX locally:
npm install
npm test
node_modules\.bin\vsce.cmd package
Install with Extensions: Install from VSIX…, or press F5 to run an Extension Development Host.