- Google chrome browser
- NetSuite Account
Steps and procedure:
Create a RESTLet in NetSuite.
- For the sake of simplicity, let’s use the following script:
- function getCustomerInfo()
- var record = nlapiLoadRecord('customer', '111');
- varcompanyName = record.getFieldValue('companyname');
- Deploy the script.
- Customization > Scripting > Scripts > New
- Select RESTLet
- Fill-up Name, upload the script and in the GET Function = getCustomerInfo
- Save and Deploy.
- In the Deployment page, in the Audience tab Roles Select All = true; Employees = true;
- Copy the EXTERNAL URL, i.e: https://rest.na1.netsuite.com/app/site/hosting/restlet.nl?script=15&deploy=1
Download the Advanced REST Client
- Go to Chrome webstore: https://chrome.google.com/webstore?utm_source=chrome-ntp-icon
- In the chrome webstore, search for “Advanced Rest Client”. This is a free chrome app. Install.
- Launch the Advanced REST client app in the chrome web browser.
- Create a New Request
- In the URL, put the external URL: https://rest.na1.netsuite.com/app/site/hosting/restlet.nl?script=15&deploy=1
- Select GET method
- In the Raw Headers paste the following:
- Authorization: NLAuthnlauth_account=TSTDRV12345, firstname.lastname@example.org, nlauth_signature=upaya123, nlauth_role=3
- Substitute the highlighted data with the information from your account.
- Once done, click Send.
- In the Raw response field, it will return the data from NetSuite, using the RESTleturl.
- This will also work with other HTTP method such as POST, PUT and DELETE. This method is particularly helpful when debugging or testing RESTlet in NetSuite if you are working with HTTP integration.
- Source (NetSuite)