NetSuiteFree referencePDF, Excel, Word exportNetSuiteAll NetSuite tools

NetSuite Script Deployment Fields: How to Deploy and Execute a Script

A Script Deployment record decides where, when, for whom and as whom a SuiteScript runs. This table lists each deployment field, the script types that have it, and the setting that avoids the usual surprises.

Download:
FieldScript typesValuesEffectRecommended settingGotcha
Script
All
Parent script record
Links the deployment to the script file and its parameters
Set by Deploy Script from the script record
One script can have many deployments, each with its own settings.
Title
All
Free text
Name shown in lists and logs
Include record type and purpose
Not the ID; logs and searches are easier with a clear title.
ID
All
customdeploy prefix plus your suffix
Script ID used by task.create, url.resolveScript and SDF
Set explicitly, for example customdeploy_so_credit_hold
Left blank, NetSuite assigns customdeploy1, customdeploy2. Hard to change later.
Deployed
All
Checked / unchecked
Unchecked means the deployment never runs
Uncheck to disable without deleting
Fastest safe kill switch for a misbehaving script.
Status: Testing
All
Testing
Runs only for the script owner
Use in sandbox and for first production checks
Other users see no effect, which looks like a bug if you forget the status.
Status: Released
User event, client, Suitelet, RESTlet, portlet, mass update, workflow action
Released
Runs for the audience defined on the deployment
Production
Released runs for every user in the audience, so set the audience before releasing.
Status: Not Scheduled / Scheduled
Scheduled, Map/Reduce
Not Scheduled, Scheduled (plus Testing)
Scheduled runs on the Schedule subtab; Not Scheduled runs only on demand or via task.create
Not Scheduled for task-triggered jobs
Save and Execute runs a Not Scheduled deployment immediately.
Log Level
All
Debug, Audit, Error, Emergency
Minimum level written to the execution log
Debug in sandbox, Audit or Error in production
log.debug calls are skipped at Audit level; leaving Debug on in production floods the log.
Execute As Role
Server scripts such as Suitelet, user event, scheduled, Map/Reduce (check your deployment form)
Current Role or a named role
Script runs with that role's permissions
A dedicated least-privilege role
Administrator is convenient and hides permission bugs that surface later. Client scripts run as the user.
Applies To
User event, client (record-level)
Record type
Record type the script attaches to
Set by the record chosen when deploying
Client scripts can also be form-level, attached on the form instead.
Event Type
User event
Single event filter, for example Create, Edit, Delete, Xedit, View, Copy, Print, Email, Approve, Reject, Cancel, Pack, Ship
Restricts execution to that event
Leave blank and filter in code with context.UserEventType for multiple events
Inline edit and mass update fire as Xedit, not Edit.
Execution Context (Context Filtering subtab)
User event, client and other types that show the subtab
User Interface, CSV Import, Web Services, REST Web Services, RESTlet, Scheduled, Map/Reduce, Suitelet, Workflow and others
Script fires only in the selected contexts
Exclude CSV Import and web services when the logic is UI only
Unselecting a context also silences the script for integrations that relied on it.
Audience: Roles
Audience-filtered types such as user event, client, Suitelet, portlet
Roles list or All Roles
Limits which users trigger or can access the script
All Roles for data rules; named roles for UI helpers
Audience on a user event controls who triggers it, not what the script can see.
Audience: Departments, Subsidiaries, Groups, Employees, Partners
Same as Roles
Lists, All Employees, All Partners
Further narrows the audience
Use groups for pilots
Criteria combine; a user must match the audience settings.
Available Without Login
Suitelet
Checked / unchecked
Generates an External URL callable without a session
Unchecked unless you need a public page
Anyone with the URL can call it; validate input and avoid exposing data.
URL / External URL
Suitelet, RESTlet
Generated, read-only
Internal and external endpoints for the deployment
Resolve in code with url.resolveScript
Hard-coded URLs break between sandbox and production because hostnames differ.
Schedule subtab
Scheduled, Map/Reduce
Single Event, Daily, Weekly, Monthly, Yearly; repeat intervals; start date and time; end by
Recurring run times
Space jobs apart to avoid queue contention
Times use the company time zone; the schedule is a request, actual start depends on processor availability.
Priority
Scheduled, Map/Reduce
High, Standard, Low
Order in the SuiteCloud processor queue
Standard unless the job is time critical
Raising everything to High removes the benefit.
Concurrency Limit
Map/Reduce
Integer up to your processor count
Maximum processors used in parallel for map and reduce
Leave room for other jobs
More concurrency increases record lock collisions on shared records.
Buffer Size
Map/Reduce
1, 2, 4, 8, 16, 32, 64
Key-value pairs processed before saving progress
1 for safest restart
Larger buffers can reprocess more pairs after an interruption.
Yield After Minutes
Map/Reduce
Minutes
Soft time limit before a job yields
Keep the default unless you have a reason
Yield happens between pairs, not inside one.
Parameters subtab
All with custscript parameters
Values for parameters defined on the script record
Per-deployment configuration
Put environment-specific IDs here, not in code
Parameters are defined on the script record but valued on the deployment (or as company or user preferences).
Scripted Records order
User event, client
Customization > Scripting > Scripted Records
Execution order of multiple scripts on one record type
Document the intended order
Two user events writing the same field depend on this order.

Field availability varies by script type; the deployment form only shows fields that apply. Status values, log levels, Map/Reduce buffer sizes and audience options follow NetSuite help for the Script Deployment record. Confirm Execute As Role on your own deployment forms.

Get your script deployments audited

Export your Script Deployments list and we will flag Testing deployments in production, Administrator execute-as roles, Debug log levels and missing context filters.

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

Was this tool useful?

How to deploy a script in NetSuite

Upload the file to the File Cabinet (SuiteScripts folder is conventional), then go to Customization > Scripting > Scripts > New, pick the file, and NetSuite reads the @NScriptType tag to create the right script record. Define script parameters on its Parameters subtab, save, and click Deploy Script. On the deployment, set the ID, keep Status at Testing, set Log Level to Debug, choose Applies To or the schedule, and set the audience. Save, test as the owner, review the execution log on the deployment, then switch Status to Released (or Scheduled) and lower the log level. All deployments are listed at Customization > Scripting > Script Deployments.

  • Permissions: SuiteScript feature enabled, role with SuiteScript permission to create scripts
  • Execution logs: View the Execution Log subtab on the script or deployment
  • Kill switch: uncheck Deployed

How to execute a script on demand

Scheduled and Map/Reduce deployments with Status Not Scheduled can be run from the deployment with Save and Execute, or from code with task.create({taskType: task.TaskType.SCHEDULED_SCRIPT or MAP_REDUCE, scriptId, deploymentId}).submit(). Check progress at Customization > Scripting > Script Status (or Map/Reduce Script Status). A deployment can only have one instance queued or running at a time, so a second submit for the same deployment fails while the first is active; create extra deployments if you need parallel submissions. Suitelets and RESTlets execute when their URL is called; user event and client scripts execute when the record event happens for a user in the audience.

Testing safely

Testing status restricts execution to the script owner, which makes it the right state for a first production check. Combine it with Log Level Debug and a narrow Event Type. For user events, remember Execution Context filtering: a script that should not touch CSV imports or web services traffic should exclude those contexts, otherwise an integration load can fire thousands of executions. Use a dedicated Execute As Role rather than Administrator so permission errors appear in testing, not after release. After testing, move parameters with environment-specific internal IDs to the deployment and confirm them in production, because internal IDs can differ between accounts that were not refreshed from each other.

Version differences and gotchas

Map/Reduce deployments carry Concurrency Limit, Buffer Size and Yield After Minutes, which scheduled scripts do not. The Priority field matters only when several jobs compete for SuiteCloud processors. Execution order of several user events on one record is set on the Scripted Records page, not on the deployment. Client scripts deployed at record level run on every form for that record; form-level client scripts are attached on the custom form instead and have no deployment record. When SDF deploys a project, the deployment settings in the XML overwrite the account settings, so keep status and audience in source control.

Frequently Asked Questions

Why does my script work for me but not for other users?

The deployment is almost certainly in Testing status, which runs only for the script owner. Other causes are an audience that excludes their role, department or subsidiary, an Execution Context filter that excludes how they edit the record, or an Event Type filter. Check all four on the deployment before debugging code.

What permission is needed to run SuiteScript?

Users do not need a SuiteScript permission to trigger a deployed script; the audience controls that. Creating and editing scripts needs the SuiteScript permission and the Client SuiteScript and Server SuiteScript features enabled. What the script can read and write depends on the Execute As Role, or on the user's role when no role is set or for client scripts.

How do I schedule a SuiteScript in NetSuite?

Create a Scheduled or Map/Reduce script, deploy it, set Status to Scheduled and fill the Schedule subtab with a single event or a recurring pattern such as daily or every hour. The schedule requests a start time; the job starts when a SuiteCloud processor is free, so leave buffer between dependent jobs.

What does Buffer Size do on a Map/Reduce deployment?

It sets how many key-value pairs a map or reduce job processes before it saves progress. With 1, an interruption reprocesses at most one pair. Larger values reduce overhead slightly but risk reprocessing more pairs after a restart, which matters if your map function is not idempotent.

If you want an assistant that can answer which scripts run on a record, as which role and in which context, straight from your NetSuite metadata on your own infrastructure, we can set that up.

ArchRay builder
Design the on-prem AI stack for NetSuite: model, GPUs, RAG pipeline, guardrails
See memory, speed and cost as you swap parts, then export the diagram. Free, in your browser.
Open the builder

Keep exploring

Free tools

ERP fixes and how-tos

AI on your ERP

Comparisons

Software