NetSuiteFree referencePDF, Excel, Word exportNetSuite

SuiteScript 2.x Modules Reference and Cheat Sheet

This is a lookup table for the SuiteScript 2.x N/ modules. Type a module name or a task into the search box and you get the module, what it is for and the methods most often used. It is meant for the moment you know what you want to do and cannot remember which module owns it.

Download:
ModuleWhat it is forKey methods and objects
N/record
Create, load, copy, transform, edit and delete records
create, load, copy, transform, submitFields, delete, Record.save
N/search
Saved searches and ad hoc searches
create, load, lookupFields, Search.run, Search.runPaged, createFilter, createColumn
N/query
SuiteAnalytics Workbook queries and SuiteQL
runSuiteQL, runSuiteQLPaged, create, load
N/runtime
Script, user, account and feature context
getCurrentScript, getCurrentUser, accountId, envType, isFeatureInEffect
N/log
Write entries to the Execution Log
debug, audit, error, emergency
N/error
Create and throw structured errors
create, SuiteScriptError
N/format
Convert between strings, dates and numbers by user preference
format, parse
N/email
Send email from a script
send, sendBulk, sendCampaignEvent
N/file
File Cabinet access
create, load, delete, copy, File.save
N/https
Outbound HTTPS calls and secure strings
get, post, put, delete, request, createSecureString
N/http
Outbound HTTP calls
get, post, put, delete, request
N/task
Submit and monitor background tasks
create, checkStatus, TaskType (scheduled script, map/reduce, search, CSV import)
N/url
Resolve URLs for scripts, records and domains
resolveScript, resolveRecord, resolveDomain
N/redirect
Server-side redirects
toSuitelet, toRecord, toSavedSearch, redirect
N/render
Print and PDF output, merge email templates
transaction, xmlToPdf, mergeEmail, statement, packingSlip
N/xml
Parse and query XML
Parser, XPath.select, escape, validate
N/encode
Encode and decode strings
convert, Encoding, Type
N/crypto
Hashes and HMAC
createHash, createHmac, createSecretKey
N/cache
Script-level caching across executions
getCache, Cache.get, Cache.put, Cache.remove
N/currentRecord
Access the record in the browser (client scripts)
get, CurrentRecord.getValue, setValue, getSublistValue
N/ui/serverWidget
Build Suitelet forms and lists
createForm, createList, Form.addField, Form.addSublist, Form.addSubmitButton
N/ui/message
Banner messages in the browser
create, Message.show, Message.hide
N/ui/dialog
Modal dialogs in the browser
alert, confirm, create
N/workflow
Start workflows and fire workflow actions
initiate, trigger
N/transaction
Transaction-level actions
void
N/currency
Exchange rates
exchangeRate
N/config
Load account configuration records
load, Type
N/sftp
SFTP connections from a script
createConnection, Connection.upload, Connection.download, Connection.list
N/util
Small helpers for 2.x scripts
each, extend, isArray, isObject, nanoTime

Method lists are a working summary, not the full API. Confirm signatures and availability in the SuiteScript 2.x API reference for your release. Some modules work only on the server or only in client scripts.

Want NetSuite answers without writing scripts?

We can walk through how a read-only natural-language layer would sit over your NetSuite data.

Optional. The tool and every export work without this. No spam.

How to use the table

Search by module (for example N/query) or by intent (for example pdf, hash, redirect). Each row gives the purpose and the headline methods. Use the export buttons to take the table into Excel or PDF for a team wiki or a new-developer pack. Rows are read-only reference data, so there is nothing to fill in. The table covers the modules developers hit in daily SuiteScript 2.1 work, not every niche module NetSuite ships.

Choosing between N/search and N/query

N/search is the older, well known route and returns results through column objects. N/query with runSuiteQL lets you write SQL-style statements, join tables in one call and use functions such as BUILTIN.DF for display values. Many developers use N/search for simple saved-search work and N/query for reporting-style reads that need joins. Both consume governance units, and both page results, so use runPaged variants for large sets rather than pulling everything at once.

  • Use N/record for single record create, edit and transform.
  • Use N/search or N/query for set-based reads.
  • Use N/task to push heavy work into a Map/Reduce or Scheduled script.

Server versus client availability

Not every module runs everywhere. N/currentRecord, N/ui/dialog and N/ui/message are for client scripts in the browser. N/ui/serverWidget, N/email, N/file and N/task run on the server. N/record, N/search and N/query run in both contexts with different limits and behavior, and client-side use can be slower and exposes logic to the browser. When a call fails with a module-not-available error, check the script type before anything else.

Frequently Asked Questions

What is the difference between SuiteScript 2.0 and 2.1?

SuiteScript 2.1 supports newer JavaScript syntax such as arrow functions, template literals, let and const. The N/ modules are the same set. New scripts are normally written as 2.1 and the annotation at the top of the file declares the version.

Do I need to load every module in define()?

Only load the modules the script uses. List them in the define array and receive them as function parameters in the same order. Loading unused modules adds clutter and does not help performance.

Which module should I use for REST calls to other systems?

Use N/https for outbound calls, which supports HTTPS and secure strings for credentials. N/http is available for plain HTTP, but most integrations should use HTTPS.

Is this table official NetSuite documentation?

No. It is a working summary written for convenience. The SuiteScript 2.x API reference in the Help Center is the authority for exact method signatures, parameters and release changes.

If your team spends time hand-writing lookups and reports against NetSuite data, ERPray can answer those questions in plain language over read-only data and show the query it ran.