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

> Source: https://netray.co/tools/netsuite-script-deployment-fields-reference
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

What each field on a Script Deployment record does, which script types have it, and the setting to use for testing and for production.

## Category

netsuite

## Erp

NetSuite

## Audience

- NetSuite administrator
- SuiteScript developer
- NetSuite technical consultant

## Tool

**Kind:** worksheet

**Mode:** reference

**Columns:**

#### Field

**Key:** field

**Type:** text

#### Script types

**Key:** applies_to_script_types

**Type:** text

#### Values

**Key:** values

**Type:** text

#### Effect

**Key:** effect

**Type:** text

#### Recommended setting

**Key:** recommended_setting

**Type:** text

#### Gotcha

**Key:** gotcha

**Type:** text

**Rows:**

**Field:** Script

**Applies to script types:** All

**Values:** Parent script record

**Effect:** Links the deployment to the script file and its parameters

**Recommended setting:** Set by Deploy Script from the script record

**Gotcha:** One script can have many deployments, each with its own settings.

**Field:** Title

**Applies to script types:** All

**Values:** Free text

**Effect:** Name shown in lists and logs

**Recommended setting:** Include record type and purpose

**Gotcha:** Not the ID; logs and searches are easier with a clear title.

**Field:** ID

**Applies to script types:** All

**Values:** customdeploy prefix plus your suffix

**Effect:** Script ID used by task.create, url.resolveScript and SDF

**Recommended setting:** Set explicitly, for example customdeploy_so_credit_hold

**Gotcha:** Left blank, NetSuite assigns customdeploy1, customdeploy2. Hard to change later.

**Field:** Deployed

**Applies to script types:** All

**Values:** Checked / unchecked

**Effect:** Unchecked means the deployment never runs

**Recommended setting:** Uncheck to disable without deleting

**Gotcha:** Fastest safe kill switch for a misbehaving script.

**Field:** Status: Testing

**Applies to script types:** All

**Values:** Testing

**Effect:** Runs only for the script owner

**Recommended setting:** Use in sandbox and for first production checks

**Gotcha:** Other users see no effect, which looks like a bug if you forget the status.

**Field:** Status: Released

**Applies to script types:** User event, client, Suitelet, RESTlet, portlet, mass update, workflow action

**Values:** Released

**Effect:** Runs for the audience defined on the deployment

**Recommended setting:** Production

**Gotcha:** Released runs for every user in the audience, so set the audience before releasing.

**Field:** Status: Not Scheduled / Scheduled

**Applies to script types:** Scheduled, Map/Reduce

**Values:** Not Scheduled, Scheduled (plus Testing)

**Effect:** Scheduled runs on the Schedule subtab; Not Scheduled runs only on demand or via task.create

**Recommended setting:** Not Scheduled for task-triggered jobs

**Gotcha:** Save and Execute runs a Not Scheduled deployment immediately.

**Field:** Log Level

**Applies to script types:** All

**Values:** Debug, Audit, Error, Emergency

**Effect:** Minimum level written to the execution log

**Recommended setting:** Debug in sandbox, Audit or Error in production

**Gotcha:** log.debug calls are skipped at Audit level; leaving Debug on in production floods the log.

**Field:** Execute As Role

**Applies to script types:** Server scripts such as Suitelet, user event, scheduled, Map/Reduce (check your deployment form)

**Values:** Current Role or a named role

**Effect:** Script runs with that role's permissions

**Recommended setting:** A dedicated least-privilege role

**Gotcha:** Administrator is convenient and hides permission bugs that surface later. Client scripts run as the user.

**Field:** Applies To

**Applies to script types:** User event, client (record-level)

**Values:** Record type

**Effect:** Record type the script attaches to

**Recommended setting:** Set by the record chosen when deploying

**Gotcha:** Client scripts can also be form-level, attached on the form instead.

**Field:** Event Type

**Applies to script types:** User event

**Values:** Single event filter, for example Create, Edit, Delete, Xedit, View, Copy, Print, Email, Approve, Reject, Cancel, Pack, Ship

**Effect:** Restricts execution to that event

**Recommended setting:** Leave blank and filter in code with context.UserEventType for multiple events

**Gotcha:** Inline edit and mass update fire as Xedit, not Edit.

**Field:** Execution Context (Context Filtering subtab)

**Applies to script types:** User event, client and other types that show the subtab

**Values:** User Interface, CSV Import, Web Services, REST Web Services, RESTlet, Scheduled, Map/Reduce, Suitelet, Workflow and others

**Effect:** Script fires only in the selected contexts

**Recommended setting:** Exclude CSV Import and web services when the logic is UI only

**Gotcha:** Unselecting a context also silences the script for integrations that relied on it.

**Field:** Audience: Roles

**Applies to script types:** Audience-filtered types such as user event, client, Suitelet, portlet

**Values:** Roles list or All Roles

**Effect:** Limits which users trigger or can access the script

**Recommended setting:** All Roles for data rules; named roles for UI helpers

**Gotcha:** Audience on a user event controls who triggers it, not what the script can see.

**Field:** Audience: Departments, Subsidiaries, Groups, Employees, Partners

**Applies to script types:** Same as Roles

**Values:** Lists, All Employees, All Partners

**Effect:** Further narrows the audience

**Recommended setting:** Use groups for pilots

**Gotcha:** Criteria combine; a user must match the audience settings.

**Field:** Available Without Login

**Applies to script types:** Suitelet

**Values:** Checked / unchecked

**Effect:** Generates an External URL callable without a session

**Recommended setting:** Unchecked unless you need a public page

**Gotcha:** Anyone with the URL can call it; validate input and avoid exposing data.

**Field:** URL / External URL

**Applies to script types:** Suitelet, RESTlet

**Values:** Generated, read-only

**Effect:** Internal and external endpoints for the deployment

**Recommended setting:** Resolve in code with url.resolveScript

**Gotcha:** Hard-coded URLs break between sandbox and production because hostnames differ.

**Field:** Schedule subtab

**Applies to script types:** Scheduled, Map/Reduce

**Values:** Single Event, Daily, Weekly, Monthly, Yearly; repeat intervals; start date and time; end by

**Effect:** Recurring run times

**Recommended setting:** Space jobs apart to avoid queue contention

**Gotcha:** Times use the company time zone; the schedule is a request, actual start depends on processor availability.

**Field:** Priority

**Applies to script types:** Scheduled, Map/Reduce

**Values:** High, Standard, Low

**Effect:** Order in the SuiteCloud processor queue

**Recommended setting:** Standard unless the job is time critical

**Gotcha:** Raising everything to High removes the benefit.

**Field:** Concurrency Limit

**Applies to script types:** Map/Reduce

**Values:** Integer up to your processor count

**Effect:** Maximum processors used in parallel for map and reduce

**Recommended setting:** Leave room for other jobs

**Gotcha:** More concurrency increases record lock collisions on shared records.

**Field:** Buffer Size

**Applies to script types:** Map/Reduce

**Values:** 1, 2, 4, 8, 16, 32, 64

**Effect:** Key-value pairs processed before saving progress

**Recommended setting:** 1 for safest restart

**Gotcha:** Larger buffers can reprocess more pairs after an interruption.

**Field:** Yield After Minutes

**Applies to script types:** Map/Reduce

**Values:** Minutes

**Effect:** Soft time limit before a job yields

**Recommended setting:** Keep the default unless you have a reason

**Gotcha:** Yield happens between pairs, not inside one.

**Field:** Parameters subtab

**Applies to script types:** All with custscript parameters

**Values:** Values for parameters defined on the script record

**Effect:** Per-deployment configuration

**Recommended setting:** Put environment-specific IDs here, not in code

**Gotcha:** Parameters are defined on the script record but valued on the deployment (or as company or user preferences).

**Field:** Scripted Records order

**Applies to script types:** User event, client

**Values:** Customization > Scripting > Scripted Records

**Effect:** Execution order of multiple scripts on one record type

**Recommended setting:** Document the intended order

**Gotcha:** Two user events writing the same field depend on this order.

**Notes:** 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.

## Content

**Intro:** 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.

**Sections:**

#### How to deploy a script in NetSuite

**Body:** 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.

**Bullets:**

- 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

**Body:** 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

**Body:** 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

**Body:** 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.

**Cta:** 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.

**Faq:**

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

**Answer:** 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?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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.

## Search terms

how to deploy a script in netsuite, how to execute a script in netsuite, netsuite permission suitescript scheduling, netsuite suitescript permission, netsuite test suitescript, netsuite script deployment status, netsuite execute as role, netsuite map reduce concurrency limit

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
