NetSuiteFree calculatorPDF, Excel, Word exportOracle NetSuite

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

records
units

Check the SuiteScript governance table for your record type and API.

units
units
units

Units kept back to reschedule or finish cleanly.

Your results

Records per run
303
Runs needed
9
Units per record
32
Total units for the batch
80,000
Limit used by one record
0.3%

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.

Save results:

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.