Suite.js Documentation

Introduction


Getting Started

• Downloading & Installing
• Running
Examples


Technical Support


Functions

Cryptography
• hashSHA256
• hmacSHA256
• hashSHA512
• hmacSHA512
• hashMD5
• hmacMD5

File System
fileExists
fileRead
fileWrite
folderExists
unzip
zip

Input / Output
beep
prompt
write
writeln

Networking
curlExecute
• nsapiExecute

Operating System
shellExecute

Text Encoding
base64Decode
base64Encode


Advanced Topics

What Is Suite.js?

Suite.js is a JavaScript runtime designed specifically for use with NetSuite. With Suite.js, you can run JavaScript-based applications that easily integrate with NetSuite.

So what's a JavaScript runtime? First, a little background...

A JavaScript engine is a program that executes code that's been written using the popular JavaScript programming language. Examples of popular JavaScript engines include Google's V8, Apple's JavaScriptCore, SpiderMonkey, and so on. The JavaScript engine that Suite.js runs on is Duktape.

You usually find JavaScript engines embedded in Web browsers. For example, Google's Chrome browser uses their V8 engine. Apple's Safari browser uses JavaScriptCore. Firefox uses SpiderMonkey.

With JavaScript engines embedded into browsers, Web developers can implement JavaScript code in Web sites and apps. However, some developers are also interested in using JavaScript for apps that run outside of Web browsers. For example, some developers use JavaScript to develop the backend code needed for Web apps. NetSuite developers use SuiteScript (which is based on JavaScript) to customize NetSuite instances.

By itself, a JavaScript engine isn't of much use to those developers. They need a convenient way to provide the engine with the JavaScript code that they want to execute, and they'll also likely want to see the results of the code. And in most cases, they'll want the engine to be able to access other resources, such as files, databases, Web APIs, and so on.

That's where a JavaScript runtime comes into play.

A JavaScript runtime is a program that embeds a JavaScript engine, and provides the functionality needed to specify the code to be run, access to the resources that it needs (files, databases, Web APIs, etc), and so on.

Over the years, several JavaScript runtimes have been developed. The most popular JavaScript runtime is Node.js. Others include Deno and Bun.

Like other JavaScript runtimes, Suite.js is designed for running JavaScript outside of a Web browser. But what makes Suite.js different is its NetSuite integration support.

Suite.js provides easy to use APIs for integrating with NetSuite via SuiteTalk REST and RESTlets (including SuiteAPI), and support for SuiteAnalytics Connect is coming soon.

Suite.js is especially helpful when it comes to developing apps that automate batch-like, input/output intensive NetSuite processes.

For example, Suite.js has been used to develop:
• An app that uses SuiteAPI to generate and download PDFs of recent NetSuite sales orders, and then uploads the PDFs to an Amazon S3 bucket.
• An app that manages and monitors a large number of shipments that have been made to fulfill orders in NetSuite. It tracks the packages, and sends shipped and delivered notifications when applicable.
• An app that retrieves new orders that have been placed via a third-party ecommerce system, and loads the orders into NetSuite.
• An app that queries NetSuite to get current inventory levels and pricing for all active inventory items, uses that data to generate an Excel file, and then uploads that file to an FTP server so that customers can download it.

© Copyright 2025 Tim Dietrich. | Legal Info