SuiteScript Hello World Fundamentals

SuiteScript Versions

Learn more about the current version SuiteScript and how it varies from previous versions:

SuiteScript Reserved Words

SuiteScript includes a list of reserved words that you cannot use as variable names or function names in your scripts; see SuiteScript Reserved Words.

SuiteScript 2.1 Script Types and Entry Points

Decide which predefined script type to use. Each script type is designed for a specific type of situation and triggering events, see SuiteScript 2.x Script Types:

Available entry points are analogous to types of events. Entry points include fieldChanged(scriptContext), which represent a change to the value of a field, and pageInit(scriptContext), which represents the loading of a page.

The scheduled script type has only one entry point, called execute; it represents the point at which a schedule executes the script or a user manually executes the script.

SuiteScript 2.1 Modules

SuiteScript 2.1 has Modular Architecture.

In an entry point script, load a module by using the define Object; list the modules to load as an argument of the define function.

Globally available APIs are listed in SuiteScript 2.x Global Objects.

Entry Point Scripts Versus Custom Module Scripts

The "Hello World" example script and all of its logic is contained within one script file. In SuiteScript 2.1, these supporting script files are known as custom module scripts.

The primary script file — the one that identifies the script type, entry point, and entry point function — is known as an entry point script. See SuiteScript 2.x Custom Modules.