# SuiteScript Script Types and Entry Points Reference

> Source: https://netray.co/tools/suitescript-script-types-entry-points-reference
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Every SuiteScript 2.x script type with its entry point functions, typical use and governance guidance in one searchable table.

## Category

netsuite

## Erp

NetSuite

## Audience

- NetSuite developer
- Technical consultant

## Tool

**Kind:** worksheet

**Mode:** reference

**Columns:**

#### Script type

**Key:** type

**Type:** text

#### @NScriptType value

**Key:** annotation

**Type:** text

#### Entry points

**Key:** entry

**Type:** text

#### Typical use

**Key:** use

**Type:** text

#### Governance per execution

**Key:** gov

**Type:** text

**Rows:**

**Type:** Client Script

**Annotation:** ClientScript

**Entry:** pageInit, fieldChanged, postSourcing, sublistChanged, lineInit, validateField, validateLine, validateInsert, validateDelete, saveRecord

**Use:** Form behavior and validation in the browser

**Gov:** 1,000 units

**Type:** User Event Script

**Annotation:** UserEventScript

**Entry:** beforeLoad, beforeSubmit, afterSubmit

**Use:** Logic when a record is viewed, saved or deleted on the server

**Gov:** 1,000 units

**Type:** Scheduled Script

**Annotation:** ScheduledScript

**Entry:** execute

**Use:** Batch jobs run on a schedule or on demand

**Gov:** 10,000 units

**Type:** Map/Reduce Script

**Annotation:** MapReduceScript

**Entry:** getInputData, map, reduce, summarize

**Use:** Large parallel processing with automatic yielding

**Gov:** 10,000 units per function invocation, per stage rules apply

**Type:** Suitelet

**Annotation:** Suitelet

**Entry:** onRequest

**Use:** Custom pages, forms and server-side endpoints

**Gov:** 1,000 units

**Type:** RESTlet

**Annotation:** Restlet

**Entry:** get, post, put, delete

**Use:** Custom REST endpoints for integrations

**Gov:** 5,000 units

**Type:** Portlet Script

**Annotation:** Portlet

**Entry:** render

**Use:** Custom dashboard portlets

**Gov:** 1,000 units

**Type:** Workflow Action Script

**Annotation:** WorkflowActionScript

**Entry:** onAction

**Use:** Custom action inside a SuiteFlow workflow

**Gov:** 1,000 units

**Type:** Mass Update Script

**Annotation:** MassUpdateScript

**Entry:** each

**Use:** Per-record logic for mass update jobs

**Gov:** Check Help Center for your release

**Type:** Bundle Installation Script

**Annotation:** BundleInstallationScript

**Entry:** beforeInstall, afterInstall, beforeUpdate, afterUpdate, beforeUninstall

**Use:** Setup tasks when a SuiteApp is installed or updated

**Gov:** Check Help Center for your release

**Notes:** Governance numbers change by release and context. Treat the figures as planning guidance and confirm them in the SuiteScript governance documentation for your account before you design around them.

## Content

**Intro:** Choosing the wrong script type is one of the most common causes of governance errors and brittle customizations. This table lists each SuiteScript 2.x script type with its entry point functions and a typical use, so you can pick the right one and write the correct annotation.

**Sections:**

#### How to read the table

**Body:** The annotation column is the exact value you place after @NScriptType in the file header. Entry points are the function names NetSuite expects the script to return from define(). Search for a function name such as afterSubmit to find which script type owns it. Export the table to share with a team or to include in a coding standard.

#### Picking a type by workload

**Body:** Use a User Event script for logic tied to one record event, a Client script for browser validation, a Suitelet for a custom page and a RESTlet for an integration endpoint. For work that touches thousands of records, move to Scheduled or Map/Reduce. Map/Reduce is built for volume because it splits work into stages and yields automatically, while a Scheduled script must watch its own remaining usage.

**Bullets:**

- Heavy work in a User Event slows every save and risks the usage limit.
- Keep afterSubmit light and push long work to a queued task.
- Never rely on client scripts alone for rules that must always hold.

#### Common mistakes

**Body:** Developers often write heavy search loops inside beforeSubmit, which makes saves slow for every user. Another frequent error is putting security-sensitive validation only in a client script, which can be bypassed by imports, web services and scripts. Also check that the entry point names are spelled exactly, since a misspelled function is simply ignored and the script appears to do nothing.

**Cta:** If you maintain a large estate of SuiteScript customizations and want help reviewing them, Netray and its partners can look at your scripts and suggest which to simplify or retire.

**Faq:**

#### Which script type should I use for an integration?

**Answer:** A RESTlet is the usual choice for a custom inbound endpoint. For scheduled outbound sync, use a Scheduled or Map/Reduce script. Standard REST and SOAP web services may be enough without any script.

#### When should I choose Map/Reduce over Scheduled?

**Answer:** Choose Map/Reduce when you process many independent records and want parallelism and automatic governance handling. Choose Scheduled when the job is small, sequential or order dependent.

#### Can I run a User Event script on CSV import?

**Answer:** Yes. User Event scripts run on server-side saves including imports and web services, unless the script deployment or logic excludes that execution context. Check the context in your code if behavior should differ.

#### Are governance units the same for every account?

**Answer:** Not always. Limits are published per script type, but they can be revised between releases. Verify the current numbers in the Help Center before designing a high-volume script.

## Search terms

suitescript script types, suitescript entry points, user event beforeSubmit afterSubmit, map reduce getInputData map reduce summarize, suitescript client script functions, restlet get post put delete suitescript, netsuite script type governance limits

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
