NetSuiteFree calculatorPDF, Excel, Word exportNetSuite

NetSuite Governance Unit Calculator for SuiteScript

Every SuiteScript API call that touches data costs governance units, and each script stage has a ceiling. This calculator shows how many units a planned run will use and how many records can be processed before the script must stop, yield or reschedule.

Your numbers

Check the SuiteScript governance table for the exact limit of your script type and stage.

records
calls
units

Varies by record type. Transactions cost more than custom records.

calls
units

Varies by record type. Verify in the governance table.

units
10 %

Your results

Estimated units for this run
6,050
Max records per execution
28
Reschedule or yield after this many records.
Units per record
30
Usable units after buffer
900
Share of limit used
605%
Executions needed for this volume
8

Unit costs depend on record type and API. Use the SuiteScript governance table in NetSuite Help for the exact values in your release, and confirm in a sandbox with runtime.getCurrentScript().getRemainingUsage().

Save results:

Estimated units vs records processed

Sweeps Records processed per run from 0 to 600, holding your other inputs fixed.

Script performance review

Optional review of your slowest or most governance-heavy NetSuite scripts.

Optional. The tool and every export work without this. No spam.

How to use the calculator

Choose the limit for your script type and stage, then enter the records per run, the number of loads and saves per record and the unit cost of each. Add a fixed amount for searches and lookups made once per run. The result shows total units, the share of the limit used and the maximum records per execution after your safety buffer. If the total exceeds the limit, split the work across stages or runs.

The formula

Units per record are loads times load cost plus saves times save cost. Total units are records times units per record plus fixed units. Usable units are the limit reduced by the buffer, and the maximum records per execution is the usable units minus fixed units, divided by units per record and rounded down. Executions needed is the volume divided by that maximum, rounded up.

  • Load and save costs differ by record type
  • submitFields is usually cheaper than load and save
  • Search pages and lookupFields have their own costs
  • Keep a buffer for logging and error paths

Reading the result

With the defaults, a record costs 30 units and the 1000 unit limit with a 10 percent buffer allows about 29 records. That is why a user event that rewrites many child records fails, while a map/reduce script, which resets usage for each map and reduce invocation, can process the same volume safely. If the maximum is small, redesign around submitFields, fewer loads or a map/reduce structure.

Common mistakes

People often use one unit cost for every record type, forget that searches consume units per page, and assume governance resets between loop iterations. It does not. Another mistake is checking remaining usage only at the end. Check getRemainingUsage inside the loop and stop early, and test with production-sized data, since sandbox data volumes hide the problem.

Frequently Asked Questions

What are governance units in NetSuite?

They are a metered cost for SuiteScript API calls such as loading, saving and searching records. Each script type and stage has a maximum per execution, and exceeding it throws an error that stops the script.

How do I check remaining usage?

Call runtime.getCurrentScript().getRemainingUsage() in SuiteScript 2.x and compare it with the cost of your next operation. Stop, yield or reschedule when it drops below a threshold you choose.

Why use map/reduce for big jobs?

Map/reduce splits work into many small invocations, each with its own governance allowance, and NetSuite manages queueing and retries. This avoids the single-run ceiling that scheduled scripts hit with large volumes.

Do the defaults in this calculator apply to every record?

No. They are placeholders. Costs differ by record type and API, so replace them with the values from the SuiteScript governance table for your release and confirm with a sandbox run.

If your NetSuite customizations are hitting governance limits, Netray can help review scripts and design batch patterns, with a human approving every change.