What You Can Do with the SuiteScript API

SuiteScript is a JavaScript-based API that provides the ability to extend NetSuite beyond its standard capabilities and additional capabilities provided through point-and-click customization.

You can access most NetSuite forms, records, and customization objects through SuiteScript. What you decide to do with SuiteScript depends on which part of NetSuite you're trying to extend, search, or process.

Before using SuiteScript, consider what you want to achieve in NetSuite:

  1. What You Want to Do

  2. SuiteScript Modules That Support What You Want to Do

  3. How To Run a Script in NetSuite

What You Want to Do

The following table shows some of SuiteScript uses. Links are provided to the NetSuite script type you can use to programmatically accomplish the tasks.

Task

Suggested NetSuite Script Type

Perform custom business processing when NetSuite records are updated, created, or deleted

SuiteScript 2.x User Event Script Type

Perform custom validations and calculations in the browser

SuiteScript 2.x Client Script Type

Create custom user interfaces

SuiteScript 2.x Suitelet Script Type or SuiteScript 2.x User Event Script Type and SuiteScript 2.x UI Modules

Run batch processes

SuiteScript 2.x Scheduled Script Type

Execute NetSuite searches

SuiteScript 2.x User Event Script Type or SuiteScript 2.x Scheduled Script Type

Perform utility processing, such as sending email and faxes, creating and uploading files, or working with XML documents

SuiteScript 2.x Suitelet Script Type or SuiteScript 2.x User Event Script Type

Create custom dashboard portlets

SuiteScript 2.x Portlet Script Type

Perform processing in target accounts for packaged SuiteApps as part of SuiteApp installation or update

SuiteScript 2.x Bundle Installation Script Type and SuiteScript 2.x SDF Installation Script Type

SuiteScript Modules That Support What You Want to Do

The SuiteScript API documentation is organized by the types of tasks most developers want to perform. See SuiteScript 2.x API Reference to get started with the SuiteScript API.

See SuiteScript 2.x Modules to see how all the SuiteScript 2.x API is organized into modules. The documentation for each module lists whether it can be used in client, user event, scheduled, Suitelet, or portlets scripts.

How To Run a Script in NetSuite

There are two ways to run SuiteScript scripts:

To upload and deploy a script in the NetSuite UI:

  1. Write and save your script as a JavaScript file.

  2. Upload the JavaScript file to NetSuite.

  3. Create a script record for your script.

  4. Create a script deployment record to define script runtime options and deploy the script.

To learn about each step in the above process, see SuiteScript 2.x API Introduction. This topic includes information about script basics, the script creation process, and a sample Hello World! script.

Related Topics

General Notices