netsuite

0.0.3 • Public • Published

Getting Started

Install the package using npm.

$ npm i netsuite --save

Create a new instance of the client. Initializing the client is an asynchronous operation.

'use strict';
const netsuite       = require('netsuite');
const netsuiteClient = new netsuite({
  accountId : YOUR_ACCOUNT_ID,
  appId     : YOUR_APPLICATION_ID,
  baseUrl   : YOUR_BASE_URL,     // defaults to production NS - https://webservices.netsuite.com/services/NetSuitePort_2016_1
  password  : YOUR_PASSWORD,
  roleId    : YOUR_ROLE_ID,
  username  : YOUR_USERNAME,
  wsdlPath  : YOUR_WSDL_PATH    // defaults to wsdl (v2016) inside of npm directory
});
netsuiteClient.init((err) => {
  // handle error if needed
  // netsuiteClient methods will now work
});

Methods

Get Record

Retrieve a NetSuite Record of any allowed type using an internalId. Handle call asynchronously using a callback.

netsuiteClient.getRecord(type, internalId, callback);

Arguments

  • type (String): Type of Record (i.e. 'salesOrder', 'customer')
  • internalId (String|Number): Internal Id of Record
  • callback (Function): (err, resp)

Package Sidebar

Install

npm i netsuite

Weekly Downloads

1

Version

0.0.3

License

ISC

Last publish

Collaborators

  • kevgary