Suitelet Script Deployment Page

Before you can run a Suitelet script, you need to create at least one deployment record for i.

A Suitelet deployment record is like other script types, but it has a few extra fields. This topic covers all available fields.

You can access a Suitelet script deployment record in the following ways:

Suitelet Script Deployment Page Body Fields

The table below shows the body fields for Suitelet deployment records. Some fields only show up when you edit or view an existing record.

Field

Description

Script

A a link to the script record for the deployment. You can’t change it—even on a new deployment record. If you realize you picked the wrong record, you’ll need to start over

Title

The user-defined name for the deployment.

ID

A unique identifier for the deployment.

On a new record,you can set this ID in the ID field. If you plan to bundle the deployment for another account, it’s best to use a custom ID to avoid naming conflicts. IDs must be lowercase and cannot use spaces. You can use an underscore as a delineator.

If you don’t enter an ID, the system creates one for you. In either case, it adds the customdeploy prefix when you save the record.

Although it’s not the preferred method, you can change the ID on an existing deployment by clicking Change ID.

Deployed

This setting shows if the deployment is active. You’ll need to check this box for the script to run.

Status

The status can be set to Testing or Released.

  • Testing — The script runs for the script owner and chosen audience.

  • Released — The script runs for all specified audience members.

See Errors Related to the Available Without Login URL to learn more about the relevance of the Released status when deploying internally and externally available Suitelets.

Event Type

Use the Event Type list to specify a script execution context at the time of script deployment.

When you pick an event type, the script only runs for that event—even if the script file lists others.

Important:

Event types you choose in the UI override those in the script file. For example, if you select delete in the Event Type list, the script only runs on delete—even if the script file has create. If you leave Event Type blank, your script only runs on the types listed in the script file.

Log Level

This setting controls what log messages show up in the Execution Log for deployment and script records. The available levels are:

  • Debug — suitable for scripts still being tested; this level shows all debug, audit, error and emergency messages.

  • Audit, Error, or Emergency — suitable for scripts in production mode. Audit is the most inclusive, and Emergency is the most limited.

Execute As Role

Shows which role runs the script.

Available Without Login

Shows if users without an active NetSuite session can access the Suitelet. See Setting Available Without Login.

Setting Available Without Login

When you check the Available Without Login box and save the script deployment record, an External URL appears on the Script Deployment page. Use this URL for Suitelets you want to make available to users without an active NetSuite session.

Only some SuiteScript APIs work in externally available Suitelets. If you want to use every SuiteScript API, your Suitelet needs a valid NetSuite session, which means users have logged in with their email and password.

Here are a few examples of when you might want to make a Suitelet externally available:

Note:

Suitelets are not intended for use in systems integration use cases.

Important:

Since Suitelets available without login don’t require authentication, any data in them is less secure.

Errors Related to the Available Without Login URL

Depending on your Suitelet’s use case, you’ll use either the internal or external URL as the starting point. The following are some factors that determine whether a Suitelet will successfully run:

Note:

To give internal users access, check the Select All box next to Internal Roles. To let external users who aren’t logged in access the Suitelet, make sure Online Form User is selected in External Roles. Leave the other Audience subtab fields blank.

To be able to select the Online Form User role in the External Roles field, the Online Forms feature must be enabled. To enable the feature, go to Setup > Company > Enable Features. Click the CRM subtab, and check the Online Forms box in the Marketing section. If the role is still not available after enabling the feature, you may need to log out and log back in to see the updated roles list.

The following table summarizes these dependencies:

Suitelet URL Type

Deployment Status

Audience Configuration

Result

internal

Testing

The current user is included in the selected audience.

Suitelet executes successfully.

internal

Testing

The current user is not included the selected audience.

Suitelet executes successfully.

internal

Released

The current user is not included the selected audience.

Error message: You do not have privileges to view this page.

internal

Released

The current user is included in the selected audience.

Suitelet executes successfully.

external

Testing

The current user is not included the selected audience.

Error message: You are not allowed to navigate directly to this page.

external

Testing

The current user is included in the selected audience.

Error message: You are not allowed to navigate directly to this page.

external

Released

External role Online Form User is selected.

Suitelet executes successfully.

external

Released

External role Online Form User is not selected.

Error message: You do not have privileges to view this page.

Suitelet Script Deployment Page Audience Subtab

Use the Audience subtab on the Suitelet Script Deployment page to choose which roles can access your Suitelet.

The following table summarizes the Audience subtab fields.

Field

Description

Internal Roles

Choose the internal roles that can access your Suitelet. You need to select at least one role in either the Internal Roles or External Roles fields.

To let all internal roles access it, check the Select All box.

External Roles

Choose the external roles that can access your Suitelet. You need to select at least one role in either the Internal Roles or External Roles fields.

To give access to all external roles, select all external roles in the External Roles field.

Note:

When giving access to multiple roles, especially external ones, make sure each role really needs access to the script.

Groups

Choose the groups that can access your Suitelet. If you don’t select any, all groups can access it.

Partners

Choose the partners who can access your Suitelet. To let all partners access it, check the All Partners box.

Departments

Choose the departments that can access your Suitelet. If you don’t pick any, all departments will have access

Employees

Choose the employees that can access your Suitelet. To let all employees access it, check the All Employees box.

Suitelet Script Deployment Page Links Subtab

Use the Links subtab on the Suitelet Script Deployment page to add links to your Suitelet in NetSuite Centers. For example, create a link to a Suitelet from the Support Section in the Classic Center.

Note:

For scripts to run in the Customer, Vendor, Partner, or Employee Center, make sure you’ve selected the right role on the Audience subtab. Also, script files and any other files they use must have either Company-wide Usage or Available Without Login turned on in the File Cabinet. For more information, see Permissions and File Cabinet Files.

The following table summarizes the Links subtab fields.

Field

Description

Center

The NetSuite Centers users can use to access your Suitelet.

Section

The NetSuite section of your Suitelet. Users access your Suitelet from this section.

Category

The Suitelet’s category.

Label

The Suitelet’s name. Users will see this label in the section menu after the category name.

Translation

If you’ve enabled Multi-Language for your NetSuite account, you can add translations for the Suitelet label in the Translation column.

Insert Before

Specify the section category you would like to insert your Suitelet before.

Related Topics

General Notices