When a script executes, NetSuite checks whether the current user satisfies any of the selected audience criteria.
- If you don’t specify any values on the Audience subtab, the script will execute only for the script owner even if the script deployment status is set to Released.
- If you choose both role and department options on the Audience subtab, a user must belong to one of the selected roles AND one of the selected departments to execute the script. If you choose options for any other combinations of types (groups, employees, and partners), a user need only belong to a selected option of one type OR of another.
So if your deployment is configured like this:
Roles All Roles
Employees John Doe
Script runs if user’s role is in Roles list OR user is listed as Employee
If you select All Roles, you’ve effectively made the Roles filter match everyone, because every user in the system operates under some role — and “All Roles” includes all of them.
So, even though you added only one specific employee, the “All Roles” setting overrides that restriction.
? Result: The script runs for every user in the system.