(Node + NetSuite)
This package contains functionality for connecting to NetSuite Web Services from Node, handling token authorization and SOAP XML parsing, and allows fetching records and uploading files.
npm install @twec/node-suite
Use in your node app
const NetSuite = ;// or: import NetSuite from 'node-suite';
When instatiating your netsuite object, you'll need to provide a config object with connection details. See config.json.example.
const netSuiteConfig =// various properties// see config.json.example// or the defaultConfig in index.js;const ns = netSuiteConfig;
Get a record
const record = await ns;
Upload a file
const fileRef = await ns;
Checkout other methods: look at the netsuite object
console.log(ns); and read index.js.
Currently you can only fetch records (
get operation), upload a file (
upsert operation), and fetch folders.
npm test will run both the AVA unit tests and ESLint.
Test it out locally
- Create a
config.jsonin the root of the package directory; see
config.json.examplefor an example of the format expected.
config.jsonto have the appropriate connection strings (likely pointing to sandbox)
test.jsto comment-out code to run a specific test