How to fix a Restlet request error in Postman while testing

Check if the Restlet URL used is correct compared with the Restlet script record ‘External URL link’ field value. Check if the Request type is correct(GET/POST/PUT…) Check if correct values are used for consumer key, consumer secret, access token, and token secret.We can create a new integration in NetSuite through navigation: SetUp > Integration >… Continue reading How to fix a Restlet request error in Postman while testing

NetSuite Transaction Status Search Filters

Here are some internal ids of different NetSuite transaction statuses. Couldn’t find these on ‘NetSuite Help’, so adding these from a website.These values are really useful for understanding an already created saved search filters used inside suitescript. Note: Be aware that statuses of the transaction can change in the future so before using please make… Continue reading NetSuite Transaction Status Search Filters

Adding note records or user notes to a record

Adding note records through UI We can add user notes or note records to NetSuite records such as employees, customers etc. This can be done through NetSuite UI by going to ‘Communication’ subtab and then ‘User Notes’ under the subtab. We can add a new subtab with a title and memo(description) values.Once a note record… Continue reading Adding note records or user notes to a record

Some basic NetSuite Global Search Keywords

We can use NetSuite global search to open records or pages quickly. For this type the first few letters of the record type needed to be opened and then type the search query(like record id).E.g: For opening a customer record, type “cu:” and type the name/id of the customer. cu: 001 Test Customer Or if… Continue reading Some basic NetSuite Global Search Keywords

How to stop a map-reduce while running

There is no direct way of stopping a map-reduce script while running. If the script is in queue and it is not started then we can stop it by using the ‘Cancel’ option in Map/Reduce Script Status page. To get this page, go to script deployment of the map-reduce script and click on ‘Status Page’… Continue reading How to stop a map-reduce while running

How to fix ‘Syntax error: missing ; before statement’ for suitescript documents version 2.0 and below

Suitescripts written in version 2.0 or below shows this error ‘Syntax error: missing ; before statement’ even when there is ‘;’ present after every single line of code. For example check this client script sample code in suitescript v2.0.(This is a sample code and not used for any specific purpose) /** *@NApiVersion 2.0 *@NScriptType ClientScript… Continue reading How to fix ‘Syntax error: missing ; before statement’ for suitescript documents version 2.0 and below

Comparing two different codes in Webstorm SDF Project

Local copy with account copy comparisonTo compare the local copy of the code with NetSuite account copy, right-click on the code and click on:NetSuite > Compare with Account file Comparing any random two codes in WebstormTo compare any two codes, first copy any of the two codes into clipboard(select all > copy). Right-click on the… Continue reading Comparing two different codes in Webstorm SDF Project

How to generate Basic authentication headers for REST API in suitescript?

REST API supports only ‘Basic authentication’ and ‘OAuth 1.0a’ authentication methods.We can generate Basic authentication headers for REST API requests in suitescript using suitescript modules from the username and API token(password).Authentication header need to be passed as header with every request that require authentication. If we use Postman software we can see an authentication header… Continue reading How to generate Basic authentication headers for REST API in suitescript?

Using relative path for file.load() function

To open a file in a suitescript we can use file.load() function.e.g:var fileObj = file.load({id: ‘Images/myImageFile.jpg’});fileObj.description = ‘my test file’;var fileId = fileObj.save();The id field takes the path to the file like shown in the above example or internal of the exact file. See this example:var fileObj = file.load({id: 123});fileObj.description = ‘my test file’;var fileId… Continue reading Using relative path for file.load() function