# NetSuite SuiteScript Governance Units by Script Type

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

## Short answer

A lookup of governance unit limits for each SuiteScript script type and the design guidance that follows from them.

## Category

developer

## Erp

NetSuite

## Audience

- NetSuite developer
- NetSuite administrator
- Integration engineer

## Tool

**Kind:** worksheet

**Mode:** reference

**Columns:**

#### Script type

**Key:** type

**Type:** text

#### Units per execution

**Key:** limit

**Type:** text

#### Runs on

**Key:** runs

**Type:** text

#### Design guidance

**Key:** guidance

**Type:** text

**Rows:**

**Type:** Client script

**Limit:** 1,000

**Runs:** Browser, per entry point

**Guidance:** Keep light, call a Suitelet or RESTlet for heavy work

**Type:** User event script

**Limit:** 1,000

**Runs:** Server, per event

**Guidance:** Avoid loading other records, use search lookups

**Type:** Suitelet

**Limit:** 1,000

**Runs:** Server, per request

**Guidance:** Hand off long jobs to a scheduled or map/reduce script

**Type:** RESTlet

**Limit:** 5,000

**Runs:** Server, per request

**Guidance:** Keep requests small, page large reads

**Type:** Scheduled script

**Limit:** 10,000

**Runs:** Server, queued or timed

**Guidance:** Reschedule yourself or move to map/reduce when you near the limit

**Type:** Map/reduce: getInputData

**Limit:** 10,000

**Runs:** Server, one call

**Guidance:** Return a search or query, not loaded records

**Type:** Map/reduce: map

**Limit:** 1,000

**Runs:** Server, per key

**Guidance:** One small unit of work per key

**Type:** Map/reduce: reduce

**Limit:** 5,000

**Runs:** Server, per key

**Guidance:** Group related work by key

**Type:** Map/reduce: summarize

**Limit:** 10,000

**Runs:** Server, one call

**Guidance:** Report errors and totals, avoid heavy processing

**Type:** Mass update script

**Limit:** 1,000

**Runs:** Server, per record

**Guidance:** Use for bulk edits chosen by a saved search

**Type:** Workflow action script

**Limit:** 1,000

**Runs:** Server, per action

**Guidance:** Keep actions single purpose

**Type:** Portlet script

**Limit:** 1,000

**Runs:** Server, per render

**Guidance:** Cache results and avoid large searches

**Type:** Bundle installation script

**Limit:** 10,000

**Runs:** Server, install or update

**Guidance:** Use for setup tasks in a SuiteApp

**Notes:** Limits are the commonly documented defaults per execution or per invocation of the entry point. Operation costs, such as loading a record, differ by record type and change between releases, so read the governance table in the NetSuite help for your version before sizing a script.

## Content

**Intro:** Governance units cap how much work a SuiteScript can do in one run. When a script goes over, NetSuite stops it with a usage limit error. This reference gives the limit by script type and the design habits that keep real integrations inside it.

**Sections:**

#### How to use the table

**Body:** Find your script type and compare the limit to what the script does. A RESTlet at 5,000 units that loads thirty transactions may be fine, while a user event at 1,000 units that does the same will fail on busy days. Use the guidance column to choose a safer pattern, usually a search instead of record loads or a hand-off to a map/reduce script.

#### What consumes units

**Body:** Units are charged per API call, and record operations are the expensive ones. Loading or saving a transaction costs much more than reading a field, and running a search costs per call or per page. Because costs depend on record type and release, measure with runtime.getCurrentScript().getRemainingUsage() while testing, and log it at key points.

**Bullets:**

- Prefer search.lookupFields for one or two values
- Avoid record.load inside loops
- Use submitFields for single field updates instead of load and save
- Log remaining usage during sandbox testing

#### Choosing the right script type

**Body:** Map/reduce is designed for volume. It splits work into stages and keys so the platform manages governance and parallel processing for you. Scheduled scripts suit sequential jobs with a clear order. Event driven scripts, such as user events and client scripts, should stay small because they run while a user waits or while a record saves.

#### Common mistakes

**Body:** The usual causes of usage limit errors are loops that load records one by one, searches that return everything and then process it in the same run, and user events that call other records on every save. Failures often appear only in production because test data sets are small.

**Cta:** If a custom script keeps hitting limits, we can review the design and suggest a simpler pattern or an off-platform approach for the heavy work.

**Faq:**

#### What happens when a script exceeds its governance limit?

**Answer:** NetSuite throws a usage limit exceeded error and stops the script. Work done before the error may or may not be committed depending on the script type, so design for restart and avoid half finished updates.

#### Do governance units apply to SuiteQL?

**Answer:** Yes. Query calls consume units, and large result sets add cost per page. Page through results and select only the columns you need to keep usage predictable.

#### How do I check remaining units?

**Answer:** Call runtime.getCurrentScript().getRemainingUsage() in SuiteScript 2.x and log the value at key points. Use it to decide when to yield, reschedule or stop cleanly.

#### Are these numbers guaranteed?

**Answer:** They are the documented defaults at the time of writing. NetSuite can change limits and costs between releases, so confirm against the help for your version before you design around an exact number.

## Search terms

netsuite governance units, suitescript governance limits, netsuite script usage limit exceeded, script_execution_usage_limit_exceeded, netsuite map reduce governance, netsuite restlet governance 5000, netsuite scheduled script 10000 units, suitescript script types

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