API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
TL;DR Opening
Starting in NetSuite 2026.1, examples are provided on how API governance units are calculated for user event and scheduled scripts. Understanding these calculations is essential for optimizing script performance and ensuring efficient resource usage.
What's New in API Governance
NetSuite has introduced clear examples to help developers understand how governance units are calculated for scripts. Here are two key scenarios: a user event script on standard transactions and a scheduled script on non-transaction records.
User Event Script Example
In this example, a user event script interacts with a standard transaction record type (e.g., invoice).
- Function Calls:
record.delete(options)Record.save(options)
- Total Usage Units: 40
record.delete(options)= 20 usage units for the transaction recordRecord.save(options)= 20 usage units for the transaction record
Each user event script can utilize a maximum of 1,000 usage units, allowing for extensive functionality beyond this example.
Scheduled Script Example
This scenario illustrates a scheduled script that manages a standard non-transaction record type (e.g., customer).
- Function Calls:
record.load(options)record.transform(options)email.send(options)
- Total Usage Units: 30
record.load(options)= 5 usage unitsrecord.transform(options)= 5 usage unitsemail.send(options)= 20 usage units
Scheduled scripts have a maximum capacity of 10,000 usage units, providing ample room for additional functions and operations.
Monitoring Script Usage
To further enhance your understanding of script performance and limitations, refer to the Monitoring Script Usage documentation. It contains valuable tools for tracking and optimizing your NetSuite scripts.
Who This Affects
- Developers: Creating and managing scripts to ensure efficient resource usage.
- Administrators: Overseeing script governance and performance metrics.
- Technical Teams: Implementing best practices for script efficiency and compliance with governance policies.
Key Takeaways
- API governance examples provided in NetSuite 2026.1 help clarify usage calculations for scripts.
- Understanding usage units is critical for optimizing script performance and ensuring compliance.
- User event scripts can use up to 1,000 usage units, while scheduled scripts can utilize up to 10,000.
- Monitoring tools are available to help track and analyze script performance effectively.
Weekly Update History (1)
Updated SuiteScript 2.x API Governance to include N/documentCapture methods.
View Oracle DocsWas this article helpful?