NetSuite SuiteScript 2.x is built around a powerful modular API system. Each module (prefixed with N/) handles a specific area of functionality β from working with records and running searches, to sending emails, making HTTP requests, and leveraging generative AI. This hub page is your complete reference for every NetSuite SuiteScript module, with a dedicated guide for each one.
Whether you are a beginner just starting with SuiteScript or an experienced developer looking for a quick reference, use the module index below to jump straight to the guide you need.
How NetSuite Modules Work
In SuiteScript 2.x, all functionality is encapsulated in modules that you load explicitly using AMD-style define() or require(). You only load the modules your script needs, which keeps governance usage low and your code organized. Each module has a unique N/ path (e.g., N/record, N/search, N/email) that you reference in your define array.
/**
* @NApiVersion 2.1
* @NScriptType UserEventScript
*/
define(['N/record', 'N/search', 'N/email', 'N/log'], (record, search, email, log) => {
const afterSubmit = (context) => {
log.debug({ title: 'Script triggered', details: context.type });
};
return { afterSubmit };
});
Complete NetSuite SuiteScript Module Index
Core Record & Data Modules
| Module | Purpose | Guide |
|---|---|---|
N/record | Create, load, edit, copy, and delete NetSuite records | View Guide |
N/currentRecord | Access and manipulate the currently active record in client scripts | View Guide |
N/search | Create and run on-demand or saved searches | View Guide |
N/query | Execute SuiteQL queries for advanced data retrieval | View Guide |
N/transaction | Work with financial transaction records (void, transform) | View Guide |
HTTP & Integration Modules
| Module | Purpose | Guide |
|---|---|---|
N/https | Make outbound HTTPS/HTTP requests to external APIs | View Guide |
N/http | Make HTTP requests from client-side scripts | View Guide |
N/https/clientCertificate | Make certificate-authenticated HTTPS requests (mTLS) | View Guide |
N/sftp | Connect to and transfer files via SFTP servers | View Guide |
Communication Modules
| Module | Purpose | Guide |
|---|---|---|
N/email | Send regular, bulk, and campaign emails from scripts | View Guide |
N/render | Generate PDFs, email bodies, and HTML from templates | View Guide |
File & Storage Modules
| Module | Purpose | Guide |
|---|---|---|
N/file | Create, read, write, and manage files in the File Cabinet | View Guide |
N/cache | Store and retrieve data in the NetSuite cache | View Guide |
Security & Cryptography Modules
| Module | Purpose | Guide |
|---|---|---|
N/crypto | Hash, encrypt, decrypt, and sign data in SuiteScript | View Guide |
N/encode | Encode and decode data (Base64, UTF-8, hex) | View Guide |
N/keyControl | Manage SSH/ECDSA keys for secure SFTP connections | View Guide |
N/auth | Handle token-based authentication (TBA) in scripts | View Guide |
Script Runtime & Utility Modules
| Module | Purpose | Guide |
|---|---|---|
N/runtime | Access script context, user info, execution environment | View Guide |
N/log | Write debug, audit, error, and emergency log entries | View Guide |
N/error | Create and throw custom SuiteScript errors | View Guide |
N/task | Create and schedule script tasks (Map/Reduce, Scheduled) | View Guide |
N/workflow | Trigger and interact with NetSuite workflows from scripts | View Guide |
N/redirect | Redirect users to records, searches, or external URLs | View Guide |
URL & Navigation Modules
| Module | Purpose | Guide |
|---|---|---|
N/url | Generate URLs for records, scripts, tasks, and searches | View Guide |
N/portlet | Build custom dashboard portlets using server-side scripts | View Guide |
UI Modules
| Module | Purpose | Guide |
|---|---|---|
N/ui/serverWidget | Build server-side forms, sublists, tabs, and field groups | View Guide |
N/ui/dialog | Show dialog boxes and alerts in client scripts | View Guide |
N/ui/message | Display inline messages on NetSuite pages | View Guide |
Formatting & Data Modules
| Module | Purpose | Guide |
|---|---|---|
N/format | Format and parse dates, numbers, and currencies | View Guide |
N/format/i18n | Internationalize number and date formats by locale | View Guide |
N/currency | Work with currency exchange rates in scripts | View Guide |
N/translation | Access NetSuite string translations for multi-language apps | View Guide |
XML & Data Parsing Modules
| Module | Purpose | Guide |
|---|---|---|
N/xml | Build, parse, and validate XML documents in SuiteScript | View Guide |
N/xmlparser | Parse XML strings and work with DOM elements | View Guide |
AI & Machine Learning Modules
| Module | Purpose | Guide |
|---|---|---|
N/llm | Call large language models (LLMs) for generative AI in SuiteScript | View Guide |
Choosing the Right Module
Not sure which module to use? Here are the most common tasks: to work with records use N/record, to search for data use N/search or N/query, to send emails use N/email, to call external APIs use N/https, to read or write files use N/file, to generate PDFs use N/render, to get script/user context use N/runtime, and to log messages use N/log.