SuiteScript 2.x Terminology

Note:

These definitions reflect the usage of the terms as they apply to SuiteScript 2.0 and SuiteScript 2.1. Some terms may have alternate meanings outside of the SuiteScript context.

Term

Definition

Class

A programming template that allows you to create complex objects; classes encapsulate data with code to work on that data. This applies only to SuiteScript 2.1.

Constants

A constant reference to a value. This applies only to SuiteScript 2.1.

Custom Module

A custom module is a user-defined module that serves as a JavaScript library or supporting logic. This module is separate from your entry point script. Your entry point script loads this module as a dependency.

For additional information about custom modules, see SuiteScript 2.x Custom Modules.

Deferred Dynamic Mode

See the definition for Standard Mode.

Destructuring

A JavaScript expression that allows us to extract data from arrays, objects, and maps and set them into new, distinct variables This applies only to SuiteScript 2.1.

Dynamic Mode

See the definition for Standard Mode.

Entry Point

An entry point represents the juncture at which the system grants control of the NetSuite application to the script. Each script type includes one or more entry points that are exclusive to that type. When that entry point is invoked, the system knows to execute its corresponding entry point function.

For additional information about entry points, see SuiteScript 2.x Entry Point Script Creation and Deployment, SuiteScript 2.x Hello World, and SuiteScript 2.x Script Types.

Entry Point Function

A function that executes when an entry point is invoked.

For additional information about entry point functions, see SuiteScript 2.x Entry Point Script Creation and Deployment and SuiteScript 2.x Hello World.

Entry Point Script

Your entry point script is the primary script that you attach to the script record. This script identifies the script type, entry points, and entry point functions. Each entry point script must include at least one entry point and entry point function.

For additional information about entry point scripts, see SuiteScript 2.x Entry Point Script Creation and Deployment and SuiteScript 2.x Hello World.

Enum

JavaScript does not include an enumeration type. The SuiteScript 2.x documentation utilizes the term enumeration (or enum) to describe a plain JavaScript object with a flat, map-like structure. Within this object, each key points to a read-only string value.

Governance

Governance ensures that an individual script does not consume an unreasonable amount of resources. The SuiteScript governance model is based on usage units. Certain API calls cost a specific number of usage units. And each script type has a maximum number of usage units that it can expend per execution. If the number of allowable usage units is exceeded, the script is terminated and an error is thrown.

For additional information about governance, see SuiteScript Governance and Limits.

Script

A script refers to an aggregate of

  • An entry point script file

  • All custom modules used by the entry point script

  • The script record associated with the entry point script

For additional information about the components that make up a script, see SuiteScript 2.x Entry Point Script Validation, SuiteScript 2.x Custom Modules, Script Record Creation, and SuiteScript 2.x Hello World.

Script Deployment

A script deployment determines some of the associated script’s runtime behavior. The settings you can define on a script deployment record include:

  • The record types the script executes against

  • When the script is executed

  • The audience and role restrictions

  • The script log levels

The settings found on the deployment record vary based on script type. For additional information about script deployments, see SuiteScript 2.x Entry Point Script Creation and Deployment and SuiteScript 2.x Hello World.

Script Type

SuiteScript 2.x supports several script types. Each script type is designed for specific types situation and triggering events.

For additional information about script types, see SuiteScript 2.x Script Types.

Standard Mode

There are two modes you can operate in when you work with a record in SuiteScript: standard mode and dynamic mode.

  • In standard mode, the record’s body fields and sublist line items are not sourced, calculated, and validated until the record is saved.

  • In dynamic mode, the record’s body fields and sublist line items are sourced, calculated, and validated in real-time. A record in dynamic mode emulates the behavior of a record in the UI.

Note:

Standard mode is also referred to as deferred dynamic mode.

For additional information about standard and dynamic modes, see SuiteScript 2.x Standard and Dynamic Modes and record.Record.

Usage Units

See the definition for Governance.

Related Topics

General Notices