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

Passing values to Script parameters via Suitescript

Script parameters are useful when there is a requirement to store data specific to a script but more accessible to all users other than developers. Using script parameterswe can avoid hardcoding certain values to the code that is required to be modified often. Also these values can be modified by anyone having access to the… Continue reading Passing values to Script parameters via Suitescript

Accessing email data send from email plugin inside Suitelet script

The data can be send to a suitelet from a email capture plugin implementation javascript file using ‘POST’ method.If the suitelet is triggered in ‘POST’ method, we can access this data.The data transferred using ‘POST’ method will be inside ‘scriptContext.request.body’. Since this is transferred as JSON file, the first step on using the datais to… Continue reading Accessing email data send from email plugin inside Suitelet script

Email Capture Plugin Implementation

Email Capture Plugin ImplementationWe can implement email capture functionality in NetSuite account to capture emails inorder to create email message records or use email content data.This is possible if the account already has email capture plugin installed. A email capture plugin file can be created in javascript and uploaded to NetSuite account using theplugin installed.… Continue reading Email Capture Plugin Implementation