NetSuite SuiteScript Governance Units Estimator
Every SuiteScript execution has a governance budget, and running out mid-batch means a failed or half-finished job. This estimator turns the units each record costs into records per run and runs needed, so you can choose between rescheduling, splitting work or moving to Map/Reduce.
Your numbers
Check the SuiteScript governance table for your record type and API.
Units kept back to reschedule or finish cleanly.
Your results
Unit costs are inputs on purpose. They differ by API, record type and sometimes account configuration. Confirm in the NetSuite help center before relying on the result.
Runs needed vs records to process
Sweeps Records to process from 500 to 10000, holding your other inputs fixed.
SuiteScript governance review
Optional: we can review a script or saved search for governance cost and suggest cheaper patterns.
Optional. The tool and every export work without this. No spam.
How to use it
Choose the limit for your script type. Enter how many records you must process, then the number of loads, saves and lookups per record and their unit cost. Defaults are illustrative; replace them with figures from the governance table for the exact methods you call. Keep a reserve so the script can reschedule itself or write a summary before it hits zero. The output tells you how many records one run handles and how many runs a full batch needs.
The arithmetic
Units per record equals loads times load cost plus saves times save cost plus lookups times lookup cost. Records per run is the limit minus the reserve, divided by units per record, rounded down. Runs needed is records divided by records per run, rounded up. Anything that reduces per-record units, such as submitting field changes without loading the record or using search columns instead of loading, multiplies throughput directly. For large volumes, Map/Reduce distributes work across stages and processes with its own limits.
- Prefer record.submitFields over load and save for simple updates
- Return needed values in search columns, not by loading records
- Check remaining usage inside loops and reschedule cleanly
Common mistakes
Developers often test with ten records and discover the limit only in production with ten thousand. Another is forgetting that nested loops, subrecord operations and calls inside sublists add units. Also, governance is only one limit: concurrency, script execution time and the number of queued scheduled scripts matter too. Use this estimator early in design, then confirm with the execution log, which shows actual usage per run.
Frequently Asked Questions
What are governance units in SuiteScript?
Governance units are a budget that NetSuite assigns to each script execution. Different API calls consume different amounts, and when the budget is exhausted the script stops with an error. Limits differ by script type.
When should I use Map/Reduce instead?
Use Map/Reduce when the data set is large, the work can run in parallel and you want the platform to manage yielding and restarts. For small or strictly sequential jobs, a scheduled script is simpler.
Why keep a reserve?
A reserve lets the script detect that it is near the limit, save its place and reschedule, instead of failing partway through a record update. It also covers cleanup and logging calls.
Are the default unit costs exact?
No. They are illustrative placeholders. Costs vary by API and record type, so check the official governance documentation for each call you use and enter those figures.
Netray can review your scripts and saved searches for high-governance patterns and suggest lower-cost alternatives for your team to approve.
Related Tools
NetSuite Reorder Point and Preferred Stock Level Calculator
Work out the safety stock, reorder point and preferred stock level values to enter on a NetSuite item record.
NetSuiteNetSuite Economic Order Quantity Calculator
Find the order quantity that minimizes ordering plus holding cost and compare it with the quantity you buy today.
NetSuiteNetSuite Inventory Turnover and Days of Supply Calculator
Turn annual COGS and average inventory into turns, days of supply, carrying cost and the cash tied up in excess stock.
More NetSuite tools
See all- NetSuite Landed Cost Allocation Calculator
- NetSuite Work Order Status Reference
- NetSuite Saved Search Formula Generator
- NetSuite CSV Import Template Guide
- NetSuite Assembly Build Checklist
- NetSuite Role Permission Matrix Worksheet
- NetSuite Inventory Costing Method Reference
- NetSuite Month End Close Checklist
- NetSuite License Cost Estimator