Defining Script Audience

On the Audience subtab on the Script Deployment page, define the audience access for the script. When the script is deployed, it will only run in the roles specified in the Audience subtab.

The Audience subtab is included on the Script Deployment page for these script types: Suitelet, portlet, user event, global client (deployed at the record-level), workflow action. You cannot specify an audience for scheduled scripts or bundle installation scripts.

The Script Deployment page Audience tab.

General guidelines for specifying an audience:

Be sure to save the Script Deployment record after all audience members have been defined.

If you are working with Suitelet Script Deployment records, see Errors Related to the Available Without Login URL, which discusses the relevance of the Select All box as it pertains to internally and externally available Suitelets.

Note:

Mass update script deployments and mass updates can both be assigned an audience. It is the users responsibility to make sure the two audiences are in sync. For information about working with the mass update script type, see SuiteScript 2.x Mass Update Script Type.

Using the Audience Subtab to Test Scripts

If the Status field on the Script Deployment record is set to Testing, you can test scripts assigned to specific audiences if you are a member of that audience type. For information about the Testing deployment status, see Setting Script Deployment Status.

For example, if you have written a script that you want to run for everyone in the Support Management role, you can log into NetSuite and then switch to the Support Management role to test the script. If the deployment status for this script is set to Testing, the script will run for only the script owner. After you have determined that the script runs as expected for the Support Management role, you can change the script's deployment status to Released. After it is set to Released, it will run in the account for all those assigned to the Support Management role.

This is a good approach for script owners to verify that their script will run in the accounts for specified roles, departments, groups, employees, or partners.

Using the Audience Tab in OneWorld Accounts

Script authors/owners who are developing scripts for NetSuite OneWorld accounts can specify a script audience based on subsidiary. In OneWorld accounts, the Audience subtab includes a Subsidiaries multiselect field. After choosing subsidiaries, be sure to click Save on the Script Deployment page.

If the currently logged user is a member of a subsidiary which is selected in the multiselect field on the Script Deployment page, then the script is executed.

Script owners working in a OneWorld account that has multiple subsidiaries can select the subsidiaries they want their script to run in, and then log into an account of one of the specified subsidiaries. When a script's deployment status is set to Testing, the script will execute for the script owner and specified audience. This is a good way for script owners to verify that the script will run in accounts for specified subsidiaries.

The Script Deployment page using the Audience tab for OneWorld accounts with the Subsidiaries list highlighted.

Related Topics

Subsidiary Setup
Reviewing Outbound HTTPS and SFTP Requests

General Notices