Deploying a Script by using the Script Deployment Record

Deploying a script using a script deployment records lets you access more fields than when you use the Deployments sublist on the script record. And, if you have already created a script record, in some cases, it is not possible to edit the Deployments sublist on the script record.

To deploy a script using the script deployment record:

  1. When you save your script record, you can immediately create a script deployment record by selecting Save and Deploy from the script record Save button.

    If you want to update a deployment that already exists, go to Customization > Scripting > Script Deployments and select Edit next to the deployment you want to update.

  2. On the Script Deployment page:

    • For Suitelet, scheduled, and portlet scripts, provide a name for the deployment in the Title field.

    • For user event and client scripts, select the record the script will run against in the Applies To field. In the Applies To field, you can also select All Records to deploy the script to all records that officially support SuiteScript. (For a list of these records, see SuiteScript Supported Records.)

  3. In the ID field, if desired, enter a custom scriptId for the deployment. If you do not create a scriptId, a system-generated internalId is created for you. NetSuite will add a customdeploy at the beginning of the ID you enter.

  4. (Optional) Clear the Deployed box if you do not want to deploy the script. The box is checked by default. A script will only run in NetSuite when the Deployed box is selected.

  5. In the Status field, set the script deployment status. See Setting Script Deployment Status.

  6. (Optional) In the Event Type list, specify an event type for the script execution. See Setting Script Execution Event Type from the UI.

  7. (Optional) In the Log Level field, specify which log messages will appear on the Execution Log tab after the script is executed. See Setting Script Execution Log Levels.

  8. In the Execute as Role field, select whether you want the script to execute using Administrator privileges, regardless of the permissions of the currently logged in user. See Executing Scripts Using a Specific Role.

  9. Check the Available Without Login box (for Suitelets only) to generate an External URL on save of this deployment. See Setting Available Without Login.

    Note:

    External URLs use account-specific domains. As a best practice, use url.resolveScript(options) to discover the Suitelet URL instead of hard-coding when possible.

  10. On the Audience tab, specify the audiences for the script. See Defining Script Audience.

  11. (Optional) On the Links tab (for Suitelets only), create a menu link for the Suitelet if you want to launch your Suitelet from the UI. See Suitelet Script Deployment Page Links Subtab.

  12. On the Context Filtering tab, specify the execution and localization contexts for the script. See Using the Context Filtering Tab.

  13. (Optional) On the Execution Log tab, create custom views for all script logging details. See Using the Script Execution Log Tab.

  14. Click Save.

    Note that for portlet scripts, you must enable the portlet to display on your dashboard (see Custom Portlets).

General Notices