The modern foundation for high-integrity SuiteScript development. This repository provides a pre-configured, professional-grade Developer Experience (DX) for NetSuite. It bridges the gap between traditional ERP scripting and modern software engineering by combining TypeScript, SuiteCloud Development Framework (SDF), and automated linting/formatting into a seamless local workflow.
- Compile-Time Safety: Catch API errors and type mismatches in your IDE before they ever reach a NetSuite Sandbox.
- Automated DX: Real-time linting (ESLint) and formatting (Prettier) on save, ensuring code consistency across teams.
- Infrastructure as Code (IaC): Leverage SDF to manage your NetSuite objects (Custom Records, Fields, Scripts) via XML within your Git-based workflow.
- Modern SuiteScript: Native support for SuiteScript 2.1 (ES6+) features.
Example Implementation: To see this template powering a production-grade React SPA within NetSuite, see SuiteTools.
To utilize this template, your local environment must meet the following enterprise standards:
- Node.js: v22.x (LTS) or higher.
- Package Manager: Yarn Classic (v1.22.x) — Ensures deterministic builds and optimized dependency management.
- Java: Oracle JDK 21 — Required for the SuiteCloud SDK's underlying Java-based binary operations.
- SuiteCloud CLI:
@oracle/suitecloud-cli(v3.x+) — Recommended to be installed globally (npm install -g @oracle/suitecloud-cli). - NetSuite Account: "SuiteCloud Development Integration" (245955) bundle installed in your target NetSuite environments.
These steps establish your local environment and authenticate your NetSuite connection.
-
Clone the repository:
git clone https://github.com/mattplant/netsuite-ts-sdf-template.git cd netsuite-ts-sdf-template -
Install dependencies & enable linting:
yarn install
-
Connect your NetSuite account:
yarn setup
For the intended "Zero Friction" DX, install the following extensions:
- SuiteCloud Extension for VS Code — Essential for SDF integration and account management.
- ESLint — Provides real-time feedback on code quality and standard violations.
- Prettier — Ensures consistent code style across the entire project.
Enable Automatic Tasks:
To allow TypeScript to transpile in the background automatically upon folder entry:
- Open the Command Palette (
Cmd+Shift+PorCtrl+Shift+P). - Select Tasks: Manage Automatic Tasks in Folder.
- Choose Allow Automatic Tasks in Folder.
This template includes a working Hello World example.
Files:
- TypeScript Source:
/src/TypeScripts/idev-engineering-netsuite/IDEV_SL_HelloWorld.ts - Compiled Output:
/src/FileCabinet/SuiteScripts/idev-engineering-netsuite/IDEV_SL_HelloWorld.js(auto-generated) - Script Record:
/src/Objects/customscript_idev_sl_hello_world.xml(includes deployment record)
To Test:
-
Deploy the template to your NetSuite environment:
yarn deploy -
Navigate to the deployed Hello World Suitelet in your NetSuite environment:
https://<your-account-id>.app.netsuite.com/app/site/hosting/scriptlet.nl?script=customscript_idev_sl_hello_world&deploy=customdeploy_idev_sl_hello_worldReplace
<your-account-id>with your NetSuite account ID.
-
Development: Create your logic in
src/TypeScripts/. The template'stsconfig.jsonis pre-configured to target SuiteScript 2.1 (ES6+) and includes the necessary type definitions for NetSuite's API. -
Real-time Feedback: The template automatically lints and formats your code as you work.
-
Transpilation: TypeScript is converted to SuiteScript 2.1 (ES6+) in
src/FileCabinet/SuiteScripts/via automated background tasks. -
Deployment: Use the SuiteCloud CLI or the VS Code sidebar to push to your NetSuite environment.
yarn deploy
This template was initially generated by Oracle's SuiteCloud SDK via suitecloud project:create -i and subsequently customized to create a zero-friction, professional-grade DX for SuiteScript development with TypeScript.
A rising tide lifts all boats. This template would not be possible without the incredible, ongoing work of the broader NetSuite developer community. I am firmly standing on the shoulders of giants who paved the way for modern SuiteScript development.
Special thanks and attribution to:
- Oracle NetSuite's SuiteCloud Team: For the continued evolution of the SuiteCloud SDK, SDF CLI, and the VS Code extensions that make local SDLC possible.
- Head in the Cloud Development: For maintaining the
@hitc/netsuite-typesrepository. Their work single-handedly made strict, compile-time type safety a reality for SuiteScript 2.x.
Matt Plant | Senior NetSuite Software Engineer Bringing Software Engineering Rigor to the NetSuite Ecosystem.
- GitHub: @mattplant
- Flagship Project: SuiteTools (A React-based SPA built in TypeScript and deployed to NetSuite via SDF from a monorepo).
This repository is a personal, open-source project and is not affiliated with, endorsed by, or sponsored by Oracle Corporation or NetSuite. "Oracle", "NetSuite", "SuiteScript", and "SuiteCloud" are registered trademarks of Oracle Corporation.
The methodologies, architectural patterns, and code samples provided in this repository are for educational and demonstration purposes. Enterprise ERP environments are highly customized; therefore, you assume all risk associated with using this template. Always thoroughly test code and deployments in a NetSuite Sandbox environment prior to Production release.
This project is licensed under the MIT License.
You are free to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software and architectural patterns to improve your own NetSuite environments. See the LICENSE file for the full text.