Skip to content

mattplant/NetSuite-TypeScript-SDF

Repository files navigation

NetSuite TypeScript SDF Project Template

For an example of this project template being used, see SuiteTools.

Requirements

Initial Setup

These initial steps will only need to be done once.

Core Configuration

  • clone the repo
    • git clone https://github.com/mattplant/netsuite-typescript-sdf.git
  • enable linting
    • cd netsuite-typescript-sdf; npm install
  • connect your NetSuite account
    • suitecloud account:setup

VS Code Configuration (optional)

Usage

Now in VS Code when you create your TypeScript files in the /src/TypeScripts/netsuite-typescript-sdf/ folder they will automatically be linted as you type and automatically formatted and code fixed upon saving. The corresponding JavaScript for NetSuite's API Version 2.1 (aka SuiteScript 2.1) will automatically be generated in the/src/FileCabinet/SuiteScripts/netsuite-typescript-sdf/ folder ready for deployment to your NetSuite account.

Notes

NetSuite customization development is now done with modern tools. You now have complete control over your development processes including using VS Code. Your NetSuite customizations (files, scripts and other custom objects) can be imported and exported between your NetSuite environments (production, sandbox, release preview, or development).

This template was initially built by Oracle's SuiteCloud SDK via suitecloud project:create -i.

For NetSuite TypeScript support I leveraged https://github.com/headintheclouddev/typings-suitescript-2.0.

macOS Tools (optional)

Tools I used to fulfill the above requirements in macOS.

  • Homebrew
  • Node
    • brew install node
  • TypeScript
    • npm install -g typescript
  • OpenJDK 17
    • brew install openjdk@17
  • SuiteCloud SDK
    • npm install -g @oracle/suitecloud-cli
  • VS Code (optional)
    • brew install --cask visual-studio-code
  • Oracle's SuiteCloud extension for VS Code (optional)
  • Microsoft's ESLint extension for VS Code (optional)