NetSuite SuiteScript Governance Units by Script Type
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.
| Script type | Units per execution | Runs on | Design guidance |
|---|---|---|---|
Client script | 1,000 | Browser, per entry point | Keep light, call a Suitelet or RESTlet for heavy work |
User event script | 1,000 | Server, per event | Avoid loading other records, use search lookups |
Suitelet | 1,000 | Server, per request | Hand off long jobs to a scheduled or map/reduce script |
RESTlet | 5,000 | Server, per request | Keep requests small, page large reads |
Scheduled script | 10,000 | Server, queued or timed | Reschedule yourself or move to map/reduce when you near the limit |
Map/reduce: getInputData | 10,000 | Server, one call | Return a search or query, not loaded records |
Map/reduce: map | 1,000 | Server, per key | One small unit of work per key |
Map/reduce: reduce | 5,000 | Server, per key | Group related work by key |
Map/reduce: summarize | 10,000 | Server, one call | Report errors and totals, avoid heavy processing |
Mass update script | 1,000 | Server, per record | Use for bulk edits chosen by a saved search |
Workflow action script | 1,000 | Server, per action | Keep actions single purpose |
Portlet script | 1,000 | Server, per render | Cache results and avoid large searches |
Bundle installation script | 10,000 | Server, install or update | Use for setup tasks in a SuiteApp |
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.
Scripts hitting governance limits?
Ask for a short architecture review of the heaviest scripts in your account.
Optional. The tool and every export work without this. No spam.
How to use the table
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
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.
- 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
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
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.
Frequently Asked Questions
What happens when a script exceeds its governance limit?
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?
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?
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?
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.
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.
Related Tools
NetSuite SuiteScript 2.1 RESTlet Skeleton Generator
Fill in a script name, record type and fields to get a SuiteScript 2.1 RESTlet with GET lookup, POST create, logging and error handling.
NetSuiteNetSuite SuiteQL Transaction Query Generator
Pick a transaction type, date range and row limit and get ready-to-run SuiteQL for headers, lines and the REST call that executes it.
NetSuiteNetSuite Manufacturing and Item Record Types Reference
Find the record id for assembly items, BOMs, revisions, routings and the manufacturing transactions, with a note on what each is for.
NetSuiteNetSuite Manufacturing Go-Live Checklist
A 30 item checklist covering data, setup, costing, inventory, roles and cutover before you run production in NetSuite.
More Developer Tools tools
See all- NetSuite API Retry Backoff Wait Time Calculator
- NetSuite OAuth 2.0 Access Token Refresh Calculator
- NetSuite REST Web Services Headers and Query Parameters Reference
- SuiteScript 1.0 to 2.1 API Mapping Reference for NetSuite
- NetSuite REST API SuiteQL Request Generator
- NetSuite REST API Sales Order and Journal Entry Request Generator
- NetSuite Token-Based Auth OAuth 1.0 Signature Code Generator
- NetSuite OAuth 2.0 Client Credentials (M2M) JWT Code Generator
- SuiteScript 2.1 Scheduled Script Generator for NetSuite
New to NetSuite? Start with the NetSuite guide and toolkit, or plan with NetSuite Cost Calculator, Training Path Builder, ERP Certification Study Planner.
Keep exploring
Free tools
- NetSuite SuiteScript Governance Units EstimatorEstimate how many records a SuiteScript execution can process under its governance limit and how many runs a batch will need.
- SuiteScript Script Types and Entry Points ReferenceEvery SuiteScript 2.x script type with its entry point functions, typical use and governance guidance in one searchable table.
- SuiteScript Scheduled Script Run Count CalculatorEstimate total governance units, records per run, number of reschedules and total runtime for a scheduled script before you write it.
ERP fixes and how-tos
- Fix NetSuite SSS_USAGE_LIMIT_EXCEEDED ErrorSSS_USAGE_LIMIT_EXCEEDED means your SuiteScript ran out of governance units. Learn the cause, how to check usage, and fixes using submitFields and Map/Reduce.
- Avoiding governance limit errors in NetSuite Map/Reduce scriptsUnderstand how governance is allocated per key in NetSuite Map/Reduce scripts, why SSS_USAGE_LIMIT_EXCEEDED still happens, and how to design getInputData, map, reduce and summarize stages that do not time out.
- Fix NetSuite CANNOT_CONVERT ErrorCANNOT_CONVERT means SuiteScript could not coerce a value into a field's expected data type. Learn the common setValue and format.parse causes and the fix.
Integrations
- How to add WhatsApp to Oracle NetSuiteHow to connect WhatsApp Business to Oracle NetSuite: SuiteScript triggers, RESTlets, template messages, opt-in rules and two-way replies that post back to records.
- How to integrate Microsoft Teams with Oracle NetSuiteConnect Oracle NetSuite to Microsoft Teams: approval cards, alerts, bots and Entra ID sign-in using SuiteScript, RESTlets and Power Automate or Bot Framework.