Using SuiteScript with NetSuite Records

Every record in NetSuite includes these basic components: body fields, buttons and actions, subtabs, and sublists. The following figure shows a standard sales order record with each of the basic components indicated.

Basic components of a record with the body fields, buttons and actions, subtabs, and sublists called out.

The basic components of the record are:

  1. Record object

  2. Body fields

  3. Buttons and actions

  4. Subtabs

  5. Sublists

You can use SuiteScript to create each basic component and to get and set values on each component. The following table describes the basic components.

Record Component

Corresponding SuiteScript Module

Record object

N/record Module — interact with the entire record object.

Body fields

N/currentRecord Module — interact with the body fields on the main area of the record or on a subtab.

Buttons and actions

The use of SuiteScript on built-in buttons is not currently supported, but you can use these two modules together to implement a custom button:

N/ui/serverWidget Module — add a new button object to a page.

N/action Module — perform business logic to update the state of records in view mode.

Subtabs

N/ui/serverWidget Module — programmatically add fields to a NetSuite tab or add custom subtabs.

Sublists

N/ui/serverWidget Module — interact with “line item” sublist fields.

For more information about NetSuite records, see Working with Records, Transactions, and Lists. For more information about using SuiteScript to interact with NetSuite records, see SuiteScript Records Guide.

Related Topics

SuiteScript 1.0 to SuiteScript 2.x API Map
SuiteScript 2.x API Introduction
SuiteScript Overview
What You Can Do with the SuiteScript API
SuiteScript Script Type and Execution Overview

General Notices