Script Deployment Execution Roles
Suitelet and User Event script deployments in FSM run with the dedicated Field Service System role. This role has limited access to records in NetSuite, with only the minimum permissions it needs for the scripts to run successfully. These permissions align with supported NetSuite features and FSM custom records.
By default, all Suitelet and User Event deployments listed in the table below run under the Field Service System role.
|
Script |
Script ID |
Script Deployment or Record Type |
Script Deployment ID |
|---|---|---|---|
|
Field Service Suitelet |
customscript_nx_suitelet |
Field Service Suitelet |
customdeploy_nx_suitelet |
|
Field Service Mobile Suitelet |
customdeploy_nx_mobile |
||
|
Field Service Scheduler Suitelet |
customdeploy_nx_scheduler |
||
|
Field Service Setup |
customdeploy_nx_setup |
||
|
Field Service Console |
customdeploy_nx_console |
||
|
Field Service User Event |
customscript_nx_userevent |
Customer |
customdeploy_ |
|
Employee |
customdeploy_ |
||
|
Expense Report |
customdeploy_ |
||
|
Field Service Asset |
customdeploy_nx_asset_userevent |
||
|
Field Service Configuration |
customdeploy_ |
||
|
Field Service Consumable |
customdeploy_ |
||
|
Field Service Install |
customdeploy_nx_install_userevent |
||
|
Field Service Job Safety |
customdeploy_ |
||
|
Field Service Maintenance |
customdeploy_ |
||
|
Field Service Notification |
customdeploy_ |
||
|
Field Service Recurrence |
customdeploy_ |
||
|
Field Service Repair |
customdeploy_ |
||
|
Invoice |
customdeploy_ |
||
|
Item Fulfillment |
customdeploy_ |
||
|
Opportunity |
customdeploy_ |
||
|
Project |
customdeploy_ |
||
|
Project Task |
customdeploy_ |
||
|
Quote |
customdeploy_nx_quote_userevent |
||
|
Sales Order |
customdeploy_ |
||
|
Service |
customdeploy_ |
||
|
Service Order/Case |
customdeploy_nx_case_userevent |
||
|
Subsidiary |
customdeploy_ |
||
|
Task |
customdeploy_nx_task_userevent |
||
|
Time |
customdeploy_nx_time_userevent |
||
|
Transfer Order |
customdeploy_ |
Permission Errors in FSM
NetSuite and FSM are highly configurable. NetSuite includes features that FSM doesn't support, and partners or customers might add new custom records or scripts that need extra permissions. This can lead to permission errors when FSM scripts run with the Field Service System role. To help address this, FSM lets you set alternate roles for any of these deployments. You can usually spot permission issues because NetSuite errors call them out.
Configuring Alternate Roles for Deployments
You can use the deploymentroles property in the script section of the FSM configuration file to override the role used for these script deployments. This property is used to support customers who needed extra permissions for some deployments in the past. You should only use this property if you have permission issues with FSM that can't be fixed any other way.
Here's an example of setting the Field Service Mobile Suitelet and the Asset User Event to use the role with internal ID 1888 when they run.
"script": {
"deploymentroles": {
"customdeploy_nx_mobile": "1888",
"customdeploy_nx_asset_userevent": "1888"
}
}
If you find any deployments overwritten in your account that use ID 3, contact NetSuite Customer Support to discuss removing them, as they might pose a security risk.
To configure an alternate role for a deployment:
-
To use a new role in configuration, first create it. Start by customizing the Field Service System role and adding the permissions it needs. For more information, see Customizing and Creating Roles.
-
After you create the role, note its internal ID.
-
Add the block above to the config at the top level, then edit it to pair each script deployment ID with the matching role ID from step 2.
-
Save the config file.
Make sure the active config is the one running the code when you test.
If everything's configured correctly, the script deployment page should update so the Execute As Role field shows the role you've set, not Field Service System. For more information, see Suitelet Script Deployment Page.
If you're seeing errors, update the config to use the new role and test using the steps above. You may need to add several permissions. The error message will change with each missing permission, making investigation straightforward. If you're still having issues, please raise a case with NetSuite Customer Support.