Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The NetSuite Pro

The NetSuite Pro Logo The NetSuite Pro Logo

The NetSuite Pro Navigation

  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us
Home/ NetSuite Customization Guide: Fields, Forms, Workflows & Scripts/NetSuite Script Type Usage Unit Limits

NetSuite Script Type Usage Unit Limits

Overview

Every SuiteScript in NetSuite operates under a governance model that limits how many usage units a script can consume during execution. These limits vary depending on the script type, ensuring that no single script monopolizes system resources.

If a script exceeds its allocated usage units, NetSuite automatically terminates execution β€” commonly throwing an error such as SSS_USAGE_LIMIT_EXCEEDED.

You can check the remaining units in your script using:

const runtime = require('N/runtime');
log.debug('Remaining Usage:', runtime.getCurrentScript().getRemainingUsage());

SuiteScript Usage Unit Limits by Script Type

The following table summarizes the maximum allowable usage units for each SuiteScript type in both SuiteScript 1.0 and 2.x:

Script TypeSuiteScript VersionTotal Usage Units AllowedNotes / Recommendations
Bundle Installation Scripts1.0 / 2.x10,000Each bundle installation execution is limited to 10,000 units.
Client Scripts1.0 / 2.x1,000Measured per script. Form-level and record-level scripts have independent limits of 1,000 each.
Custom Tool Scripts2.11,000Applies to each tool execution.
Map/Reduce Scripts2.x onlyDynamicNo fixed overall limit; each map/reduce stage (getInputData, map, reduce, summarize) has isolated usage tracking.
Mass Update Scripts1.0 / 2.x1,0001,000 units per record or per execution.
Portlet Scripts1.0 / 2.x1,000Use lightweight code to maintain dashboard responsiveness.
RESTlets1.0 / 2.x5,000Governed at both API and script level. Ideal for integrations; see RESTlet Governance for details.
Scheduled Scripts1.0 / 2.x10,000All combined actions within a single run cannot exceed 10,000 units. Consider Map/Reduce for long-running jobs.
SDF Installation Scripts2.x10,000Limit per execution of SDF deployment.
Suitelets1.0 / 2.x1,0001,000 units per Suitelet execution. Optimize for fast UI response to prevent poor user experience.
User Event Scripts1.0 / 2.x1,000Executed on record create/edit/delete. Keep code minimal for responsiveness.
Workflow Action Scripts (Custom Actions)1.0 / 2.x1,0001,000 units per workflow state; ensure heavy logic is separated from workflow triggers.
Core Plug-insVariesUp to 10,000Default limit unless otherwise specified per plug-in.
Custom Plug-insAny10,000Each plug-in instance limited to 10,000 units per execution.
SSP Application ScriptsSSP / SuiteCommerce1,000Governed by SSP Application Governance rules.
SuiteScript Debuggerβ€”1,000When debugging, scripts are limited to 1,000 usage units.

Choosing the Right Script Type

Different script types are optimized for different tasks.
Below are some quick guidelines:

ScenarioRecommended Script TypeWhy
Processing large data setsMap/ReduceAutomatically handles rescheduling and parallel processing.
User-triggered field logicClient or User EventRuns in response to user actions.
Custom web formsSuiteletProvides dynamic server-side UI and logic.
Scheduled background tasksScheduled ScriptBest for recurring jobs under 10,000 usage units.
Integrations / external APIsRESTletHandles REST-based communication securely.

When to Use Map/Reduce Instead of Scheduled Scripts

If your scheduled script regularly approaches 10,000 usage units, you should migrate to a Map/Reduce script.
Why:

  • Each stage runs independently with its own usage limit.
  • Automatic yielding and rescheduling built in.
  • Handles large data volumes efficiently without hitting timeouts.

Example:

if (runtime.getCurrentScript().getRemainingUsage() < 200) {
   task.create({ taskType: task.TaskType.MAP_REDUCE }).submit();
}

Best Practices for Staying Within Usage Limits

βœ… Batch Processing: Work in small record sets (e.g., 500 records per iteration).
βœ… Minimize Record Loads: Use search.lookupFields() or cached data.
βœ… Optimize Client Scripts: Avoid unnecessary logging or loops.
βœ… Monitor Usage: Log remaining usage regularly during execution.
βœ… Use Asynchronous Types (Map/Reduce, RESTlets): For long-running jobs.
βœ… Avoid Large Inline Searches: Use Saved Searches or Map/Reduce getInputData.
βœ… Reschedule Proactively: Before hitting thresholds in scheduled scripts.


Key Takeaways

  • Each SuiteScript type in NetSuite has its own usage unit threshold.
  • Exceeding this limit causes termination and potential errors.
  • Use getRemainingUsage() and efficient coding practices to stay under governance.
  • Choose the appropriate script type (Map/Reduce, RESTlet, Scheduled) based on your task scale and performance needs.

Related Reading

  • SuiteScript Governance and Usage Limits
  • Best Practices for NetSuite Customization

Share
  • Facebook

Leave a ReplyCancel reply

Sidebar

Ask A Question

Stats

  • Questions 6
  • Answers 6
  • Best Answers 0
  • Users 2
  • Popular
  • Answers
  • Rocky

    Issue in running a client script in NetSuite SuiteScript 2.0 ...

    • 1 Answer
  • admin

    How can I send an email with an attachment in ...

    • 1 Answer
  • admin

    How do I avoid SSS_USAGE_LIMIT_EXCEEDED in a Map/Reduce script?

    • 1 Answer
  • admin
    admin added an answer The issue is usually caused by following Wrong script file… September 14, 2025 at 10:33 pm
  • admin
    admin added an answer Steps to send an Invoice PDF by email: define(['N/email', 'N/render',… August 28, 2025 at 3:05 am
  • admin
    admin added an answer This error means your script hit NetSuite’s governance usage limit… August 28, 2025 at 3:02 am

Top Members

Rocky

Rocky

  • 1 Question
  • 22 Points
Begginer
admin

admin

  • 5 Questions
  • 2 Points

Trending Tags

clientscript netsuite scripting suitescript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Menu

  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us

Quick Links

  • NetSuite Scripting
  • NetSuite Customization
  • NetSuite Advanced PDF Template
  • NetSuite Integration
  • NetSuite Reporting & Analytics

Subscribe for NetSuite Insights....

© 2025 The NetSuite Pro. All Rights Reserved