SuiteScript 2.x API Governance
The following table shows the governance usage units used for each SuiteScript 2.x method. You can use the Script.getRemainingUsage() method to see how many usage units you have remaining for a particular script.
The governance model takes into account the NetSuite processing requirements for three categories of records: custom records, standard transaction records, and standard non-transaction records. For example, custom records require less processing than standard records, therefore, the usage unit cost for custom records is lower than for standard records. Similarly, standard non-transaction records require less processing than standard transaction records, therefore, the usage unit cost for standard non-transaction records is lower than for standard transaction records. Standard transaction records include records such as cash refund, customer deposit, and item fulfillment. Standard non-transaction records include records such as activity, inventory item, and customer. You can see an example of this in the N/record module methods listed below.
Record categories are included in the SuiteScript Supported Records help topic. Record types categorized as activity, communication, customization, entity, file cabinet, item, list, marketing, subrecord, support, or website are considered to be standard non-transaction records.
For examples of API governance, see API Governance Examples.
For tips on how to monitor how many usage units your script is using, see Monitoring Script Usage.
SuiteScript 2.x Module |
API(s) |
Governance Usage Units Used |
---|---|---|
None |
||
None |
||
50 |
||
None |
||
None |
||
50 |
||
None |
||
None |
||
10 |
||
10 |
||
1 if the value is present in the cache 2 if the loader function is used |
||
1 |
||
1 |
||
None |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
10 |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
10 |
||
10 |
||
10 |
||
None |
||
20 |
||
10 |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
20 |
||
None |
||
None |
||
None |
||
20 |
||
10 |
||
None |
||
None |
||
10 |
||
10 |
||
None |
||
None |
||
10 |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
None |
||
None |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
Amount of logging in any 60–minute period is limited. See Governance on Script Logging. |
||
20 |
||
20 |
||
20 |
||
None |
||
20 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
10 |
||
None |
||
None |
||
None |
||
5 |
||
None |
||
5 |
||
10 |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
20 for transaction records 4 for custom records 10 for all other records |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
10 for transaction records 2 for custom records 5 for all other records |
||
10 for transaction records 2 for custom records 5 for all other records |
||
20 for transaction records 4 for custom records 10 for all other records |
||
10 |
||
10 for transaction records 2 for custom records 5 for all other records |
||
10 for transaction records 2 for custom records 5 for all other records |
||
10 for transaction records 2 for custom records 5 for all other records |
||
10 |
||
None |
||
None |
||
None |
||
5 |
||
5 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
None |
||
None |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
(Search results are limited to 1000 records; see Search Result Limits) |
None |
|
5 |
||
5 |
||
5 |
||
None |
||
None |
||
10 |
||
10 |
||
None |
||
5 |
||
5 |
||
None |
||
None |
||
None |
||
None |
||
5 |
||
10 |
||
10 |
||
5 |
||
1 |
||
100 |
||
10 |
||
10 |
||
10 |
||
10 |
||
10 |
||
100 |
||
None |
||
20 |
||
5 |
||
5 |
||
10 |
||
10 |
||
10 |
||
10 |
||
100 |
||
100 |
||
20 |
||
25 |
||
10 |
||
25 |
||
10 |
||
25 |
||
10 |
||
25 |
||
10 |
||
10 |
||
10 |
||
10 |
||
None |
||
100 |
||
50 |
||
None |
||
20 |
||
None |
||
100 |
||
None |
||
100 |
||
20 |
||
None |
||
None |
||
N/task/accounting/recognition Module |
MergeArrangementsTask.submit() |
20 |
MergeElementsTask.submit() |
20 |
|
recognition.checkStatus(options) |
50 |
|
recognition.create(options) |
None |
|
10 |
||
1 |
||
1 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 per intersection returned |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
10 |
||
10 |
||
20 |
||
20 |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
||
None |
API Governance Examples
The following examples show how governance units are calculated in a user event script and in a scheduled script:
Script Description |
Usage Units Calculated |
---|---|
A user event script on a standard transaction record type (such as invoice) that includes:
|
This script uses a total of 40 usage units:
Each user event script can use a maximum of 1,000 usage units, so in this case, this script has plenty of room to be expanded. |
A scheduled script on a standard non-transaction record type (such as customer) that includes:
|
This script uses a total of 30 usage units:
Each scheduled script can use a maximum of 10,000 usage units, so in this case, this script has plenty of room to be expanded. |
For more examples, see Monitoring Script Usage.