Contact Us
NetSuite Portlet SuiteScript

How SuiteScript Fits Into NetSuite Customization

NetSuite offers several ways to customize and automate business processes, including workflows and SuiteScript. Workflows can handle many automation requirements without extensive custom code, while SuiteScript gives developers greater flexibility to create custom business logic, interfaces, integrations, and other functionality. So, what exactly is SuiteScript, and when would you use it?

 

A thinking face with a thought bubble regarding SuiteScript and HTML.

What is SuiteScript? NetSuite Programming Language

SuiteScript is NetSuite's JavaScript-based API and scripting framework for customizing and automating NetSuite. Developers use SuiteScript to create custom business logic, automate processes, work with NetSuite records, build integrations, and extend functionality beyond NetSuite's standard features.

Because SuiteScript is based on JavaScript, developers who already know JavaScript have a familiar foundation for NetSuite development. SuiteScript 2.1 is now NetSuite's standard scripting version, while existing NetSuite accounts may still contain scripts written in SuiteScript 1.0, 2.0, or 2.x.

If you're working with existing NetSuite customizations, check out our SuiteScript 2.1 migration guide to learn how to identify older scripts, evaluate what needs to be updated, and prepare for migration.

What Programming Language Does NetSuite Use?

NetSuite uses JavaScript as the foundation for SuiteScript, its scripting framework for custom development and automation. Developers familiar with JavaScript can use SuiteScript's NetSuite-specific APIs and modules to work with records, transactions, searches, files, integrations, and other parts of the platform.

 

Anchor Group Assessment
Contact Us

Is NetSuite right for you?

Six honest questions. We'll tell you straight - even if it's "not yet."

Question 1 / 6 Size
Your verdict
A strong fit

 

How does SuiteScript work?

SuiteScript works by allowing developers to run JavaScript-based logic in response to events and processes within NetSuite. Depending on the script type, SuiteScript can run on the server, in a user's browser, on a schedule, or when specific NetSuite records and events are triggered.

Developers use SuiteScript APIs and modules to interact with NetSuite records, searches, files, workflows, transactions, integrations, and other parts of the platform. For example, a script might validate information when a sales order is saved, automatically update a group of records, create a custom interface, or exchange data with another application.

NetSuite also provides debugging and development tools that developers can use to test and troubleshoot SuiteScript.

Read Our SuiteScript Articles >

What Can You Do With SuiteScript?

SuiteScript allows developers to customize NetSuite beyond its standard functionality and automate business processes that would otherwise require manual work. Depending on your business requirements, developers can use SuiteScript to:

  • Automate repetitive processes: Create scripts that update records, perform calculations, generate transactions, or complete other routine tasks automatically.
  • Enforce custom business rules: Validate information or trigger specific actions when users create, edit, or submit NetSuite records.
  • Customize the NetSuite user experience: Build custom pages, forms, buttons, fields, and other interfaces that support your team's workflows.
  • Work with NetSuite records and data: Search, create, update, and process NetSuite records programmatically, including large volumes of data.
  • Connect NetSuite with other systems: Build integrations that exchange data between NetSuite and ecommerce platforms, shipping providers, payment systems, and other business applications.
  • Build custom functionality: Develop solutions for business requirements that aren't fully addressed by NetSuite's standard features or workflows.

How these customizations are built depends on what needs to happen and when it needs to happen. NetSuite provides several types of SuiteScript for different purposes, including Client Scripts, User Event Scripts, Scheduled Scripts, Map/Reduce Scripts, Suitelets, and RESTlets.

SuiteScript 1.0 vs. 2.0 vs. 2.1

SuiteScript has evolved significantly since SuiteScript 1.0. While all three versions allow developers to customize and automate NetSuite, SuiteScript 2.0 introduced a modular API structure, and SuiteScript 2.1 builds on that structure while supporting more modern JavaScript language features.

  • SuiteScript 1.0 uses NetSuite's original SuiteScript API. Many long-standing NetSuite accounts still contain 1.0 scripts, but newer development generally uses the SuiteScript 2.x API.
  • SuiteScript 2.0 introduced SuiteScript modules. Instead of relying on the older 1.0 API structure, developers load the modules their script needs for a particular task. For example, the `N/record` module provides APIs for working with NetSuite records, while `N/search` provides APIs for working with NetSuite searches. This modular structure makes it easier to organize scripts around the specific NetSuite functionality they need to access.
  • SuiteScript 2.1 is now NetSuite's standard scripting version. It uses the same modular SuiteScript 2.x API while supporting newer JavaScript language features. For current development, this gives developers the SuiteScript 2.x module structure along with more modern JavaScript syntax and capabilities.

Many NetSuite accounts still contain older SuiteScript 1.0, 2.0, or other 2.x scripts, making script version an important consideration when maintaining existing customizations. If you're unsure what's running in your account, a SuiteScript 2.1 readiness audit can help inventory your scripts, identify dependencies, and determine what needs to be addressed before migration.

Types of SuiteScript

NetSuite supports several SuiteScript script types, each designed for different development and automation needs. The right script type depends on what you want the script to do, when it should run, and how it needs to interact with NetSuite records, users, or external systems.

NetSuite Script Types List

Here are some of the most common types of SuiteScript and when developers use them:

  • Suitelet — Suitelets are server-side scripts that let developers build custom pages and user interfaces within NetSuite. For example, a developer might create a Suitelet that gives users a custom form for entering information or a specialized interface for viewing and interacting with NetSuite data.
  • Scheduled Script — Scheduled Scripts run server-side logic at a defined time or on a recurring schedule. They are useful for processes that don't need to happen immediately, such as periodically updating a group of records or performing a routine data-processing task.
  • User Event Script — User Event Scripts run on the server when specific events occur on NetSuite records, such as when a record is created, loaded, edited, or submitted. Developers can use User Event Scripts to enforce business rules, validate data, automatically update related information, or trigger other business logic based on record activity. Because synchronous User Event Scripts can affect record save times when too much processing is attached to a record, script performance is also an important consideration in heavily customized NetSuite accounts. Learn more about User Event Scripts and NetSuite performance optimization.
  • Client Script — Client Scripts run in a user's browser and respond to actions taken while working with NetSuite records and forms. For example, a Client Script can validate information as a user enters it, automatically populate fields, or change how a form behaves based on a user's selections.
  • RESTlet —RESTlets allow developers to create custom REST-based endpoints for exchanging data between NetSuite and external applications. For example, a RESTlet could receive information from another business system, process it using custom logic, and create or update the appropriate records in NetSuite.
  • Bundle Installation Script — Bundle Installation Scripts run when a SuiteBundle is installed, updated, or uninstalled in a NetSuite account. Developers can use them to perform setup and configuration tasks associated with the bundle, such as validating prerequisites or preparing data required by the customization.
  • Map/Reduce Script — Map/Reduce Scripts are designed for processing large volumes of NetSuite data while distributing the workload across multiple stages. For example, a developer might use Map/Reduce to process a large set of transactions or records when the task would be too resource-intensive for a simpler script type.
  • Mass Update Script — Mass Update Scripts apply custom SuiteScript logic to records selected through NetSuite's mass update functionality. They're useful when many records need the same custom processing, such as calculating a value or updating information across a defined group of records.
  • Workflow Action Script — Workflow Action Scripts allow developers to create custom actions that can be triggered from a NetSuite workflow. They are useful when a workflow needs to perform custom business logic that goes beyond the standard actions available in NetSuite. This lets developers combine the visual automation capabilities of workflows with the flexibility of SuiteScript.
  • Portlet Script — Portlet Scripts let developers display custom content on NetSuite dashboards as portlets. They can be used to surface information that is particularly useful to a team or role, such as custom data, links, or other dashboard content.
NetSuite Portlet SuiteScript

Additional SuiteScript 2.1 Script Types

SuiteScript 2.1 also includes newer and more specialized script types that developers may encounter:

  • Event Subscriber Script (New in NetSuite 2026.2) — Event Subscriber Scripts run follow-up logic asynchronously after certain NetSuite record events, such as a record being created, updated, or deleted. They are useful when processing needs to happen after a record event but doesn't need to delay the originating record operation. For example, downstream updates, notifications, or integrations may be able to run as Event Subscriber Scripts rather than making a user wait for that processing to finish during a record save. Learn more about Event Subscriber Scripts and NetSuite performance optimization.
  • SDF Installation Script — SDF Installation Scripts can perform setup, configuration, validation, or data-management tasks when a SuiteApp is deployed using the SuiteCloud Development Framework (SDF).
  • Custom Tool Script — Custom Tool Scripts allow developers to expose NetSuite functionality as tools that external AI clients can access through the NetSuite AI Connector Service. This is a newer SuiteScript 2.1 capability designed specifically for building AI-connected NetSuite functionality.

What About NetSuite Workflows?

NetSuite workflows are another way to automate business processes, but a workflow itself is not a type of SuiteScript. Workflows can automate actions across NetSuite records without requiring the same level of custom code. For example, you might use a workflow to manage a sales order approval process based on user actions or record values.

SuiteScript and workflows can also work together. A developer can create a Workflow Action Script when a workflow needs to execute custom logic beyond the standard actions available in NetSuite.

Interested in learning more about NetSuite workflows? Check out our article How to Create a NetSuite Workflow.

A SuiteScript Learning Tip From Our Developers

If you're new to SuiteScript, one of the challenges is getting comfortable with how JavaScript works alongside HTML and CSS. One tool our developers have found helpful while learning and experimenting with these concepts is CodePen.io.

CodePen separates HTML, CSS, and JavaScript into different areas, making it easier to see what each language is responsible for and how they work together. For someone beginning with SuiteScript, experimenting in an environment like this can help build familiarity with JavaScript before working with more complex scripts inside NetSuite.

CodePen isn't a replacement for testing SuiteScript in NetSuite, but it can be a useful learning environment for practicing the underlying web-development concepts that SuiteScript developers encounter.

SuiteScript Use Cases and Problem Solving

Our NetSuite developers have documented dozens of SuiteScript solutions while solving real customization, automation, performance, and troubleshooting challenges. Here are a few examples of how SuiteScript can be used to solve specific NetSuite problems:

You can also browse our SuiteScript articles for more code examples, troubleshooting guides, automation techniques, and solutions documented by our NetSuite developers.

If you don't see your particular issue covered, contact our team and tell us what you're trying to accomplish in NetSuite.

SuiteScript Development and Debugging Resources

When developing or troubleshooting SuiteScript, several NetSuite resources can help you understand available APIs, find record and field information, and diagnose problems:

  • NetSuite Help Center — NetSuite's official SuiteScript documentation includes information about APIs, modules, script types, governance limits, development requirements, debugging, and code samples.
  • SuiteAnswers — SuiteAnswers supplements NetSuite's documentation with support articles, training videos, best-practice information, and solutions for specific NetSuite issues.
  • SuiteScript Records Browser — The SuiteScript Records Browser provides reference information about the records, fields, sublists, search joins, search filters, search columns, and record transformations supported in SuiteScript. For a walkthrough of NetSuite's developer reference tools, see our NetSuite Schema Browser: Developer Reference Guide.
  • Records Catalog — The Records Catalog provides account-specific information about record types, fields, relationships, and available APIs based on the features and customizations enabled in your NetSuite account. It is particularly useful when working with SuiteScript's analytic APIs, including the N/query module.
  • SuiteScript 2.1 Debugger — NetSuite's SuiteScript 2.1 Debugger uses Chrome DevTools to help developers test and troubleshoot SuiteScript 2.1, including tools for breakpoints, step-by-step execution, console output, and variable inspection.

SuiteScript gives businesses a way to extend NetSuite beyond its standard functionality using JavaScript-based custom development. From automating repetitive processes and enforcing business rules to building integrations, custom interfaces, and specialized functionality, SuiteScript allows NetSuite to adapt to business requirements that can't always be addressed through standard configuration or workflows.

If you're trying to solve a specific NetSuite development challenge, optimize existing SuiteScript, or determine the best approach for a new customization, contact our NetSuite development team.

Related Articles

Tagged with Training, Automation