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 = ;const netsuiteClient =accountId : YOUR_ACCOUNT_IDappId : YOUR_APPLICATION_IDbaseUrl : YOUR_BASE_URL // defaults to production NS - https://webservices.netsuite.com/services/NetSuitePort_2016_1password : YOUR_PASSWORDroleId : YOUR_ROLE_IDusername : YOUR_USERNAMEwsdlPath : YOUR_WSDL_PATH // defaults to wsdl (v2016) inside of npm directory;netsuiteClient;
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)