All notes
NetSuite4 min readUpdated August 11, 2026

Connecting VS Code to NetSuite with SDF

Setting up the SuiteCloud CLI and the VS Code extension, pulling files and objects from the account down to your machine, then sending them back — plus the setup errors that block people most often.

NetSuiteVS CodeSDFSuiteCloud CLIDeployToken-Based AuthenticationSuiteScript

You can write SuiteScript in NetSuite's built-in editor, but there is no change history, no Git, and no easy way to move work from Sandbox to Production. The SuiteCloud Development Framework (SDF) solves all three: the code lives on your machine as an ordinary project and is pushed to the account by command.

Two tools that complement each other

  • SuiteCloud CLI for Node.js — the actual engine, installed through npm. Everything can be done from the terminal.
  • SuiteCloud Extension for Visual Studio Code — Oracle's official wrapper that surfaces those CLI commands in the Command Palette and the right-click menu.

The extension calls the CLI behind the scenes, so the CLI still has to be installed. When the extension behaves strangely, run the same command from a terminal — the error message there is far clearer.

Prerequisites

On your machineIn the NetSuite account
Node.js on an LTS releaseThe SuiteCloud Development Framework feature enabled
Oracle JDK — the version required by your SuiteCloud releaseThe Token-Based Authentication feature enabled
SuiteCloud CLI installed globallyA role with SuiteScript and SDF Deployment permissions

Setting up a project

From nothing to connected
npm install -g @oracle/suitecloud-cli

# Create a project — choose Account Customization Project for
# customising one account rather than building a SuiteApp
suitecloud project:create -i

# Connect to the account; this opens a browser to authorise
cd project-name
suitecloud account:setup

What is inside an SDF project

project-name/
├── src/
│   ├── FileCabinet/
│   │   └── SuiteScripts/        ← .js files and other assets
│   ├── Objects/                 ← custom records, fields, forms, script records
│   ├── AccountConfiguration/    ← account-level preferences
│   ├── deploy.xml               ← what actually gets sent
│   └── manifest.xml             ← dependencies and required features
└── project.json

The split between FileCabinet and Objects matters. FileCabinet holds files — SuiteScript code, images, templates. Objects holds customisation definitions as XML: custom records, custom fields, script records and their deployments. A new SuiteScript only works once both exist: the code file, and the script record object pointing at it.

Two directions people mix up

In SDF, import means pulling from NetSuite down to your machine. Sending the other way is called upload or deploy. Misreading the direction can overwrite local work.

GoalCLI commandDirection
Pull one file from the File Cabinetsuitecloud file:importNetSuite → local
Pull a customisation objectsuitecloud object:importNetSuite → local
List the objects in the accountsuitecloud object:listNetSuite → local
Send a single filesuitecloud file:uploadlocal → NetSuite
Check without sendingsuitecloud project:validate --serverlocal → NetSuite
Send everything in deploy.xmlsuitecloud project:deploylocal → NetSuite
The daily loop
# Take the latest from the account before changing anything
suitecloud file:import --paths /SuiteScripts/ue_sales_order.js

# After editing, send just that file — fast, for iteration
suitecloud file:upload --paths /SuiteScripts/ue_sales_order.js

# Send a complete package including its objects
suitecloud project:validate --server
suitecloud project:deploy

In VS Code every one of those is available from the Command Palette under SuiteCloud, and several appear when right-clicking a file in the Explorer. For a small change to a single file, file:upload is far quicker than deploying the whole project.

The errors that come up most

SymptomUsual cause
Authentication refused during account:setupWrong account ID, Sandbox suffix included
The CLI fails with no clear messageThe JDK version does not match
The account does not recognise SDF commandsThe SuiteCloud Development Framework feature is off
Deploy refused on permissionsThe role lacks SDF Deployment permission
Deploy fails on dependenciesmanifest.xml is incomplete; run project:adddependencies
An object fails to createIt references a custom field that does not exist in the target account

More notes