1.0.1 • Published 7 years ago

netsuite-v2017.2 v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

NetSuite SOAP client for NodeJS based apps (v2017.2)

This library is at early alpha stage, don't expect it to do much. If you are using NodeJS and struggling to get data from NetSuite's SOAP based SuiteTalk API then looking through the code may prove informative.

Install

npm install netsuite-v2017.2

Usage

With credentials:

var NetSuite = require('netsuite-v2017.2');
var ns = new NetSuite({appId: 'AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA', passport: {account: 'TSTDRV111111', email: 'you@yourcompany.com', password: 'shhhhh'}});

Retrieve Files in the file cabinet

Here's a quick example that will loop through all files in your account:

var NetSuite = require('netsuite-v2017.2');
var ns = new NetSuite({appId: 'AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA', passport: {account: 'TSTDRV111111', email: 'you@yourcompany.com', password: 'shhhhh'}});

var result = await ns.search({type: 'FileSearch'});
while (result) {
    result = await ns.searchMoreWithId(result);
}

Supported seach objects

  • FolderSearch
  • FileSearch

Get a file from the file cabinet

var NetSuite = require('netsuite-v2017.2');
var ns = new NetSuite({appId: 'AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA', passport: {account: 'TSTDRV111111', email: 'you@yourcompany.com', password: 'shhhhh'}});

var result = await ns.get({type: 'file', internalId: '88'});
var b64Content = result.readResponse.record.content;

Testing

To run unit tests, execute npm test

Licence

This NetSuite SOAP client is distributed under the MIT licence.

1.0.1

7 years ago

1.0.0

7 years ago