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_nx_customer_userevent

Employee

customdeploy_nx_employee_userevent

Expense Report

customdeploy_nx_expensereport_userevent

Field Service Asset

customdeploy_nx_asset_userevent

Field Service Configuration

customdeploy_nx_configuration_userevent

Field Service Consumable

customdeploy_nx_consumable_userevent

Field Service Install

customdeploy_nx_install_userevent

Field Service Job Safety

customdeploy_nx_jobsafety_userevent

Field Service Maintenance

customdeploy_nx_maintenance_userevent

Field Service Notification

customdeploy_nx_notification_userevent

Field Service Recurrence

customdeploy_nx_recurrence_userevent

Field Service Repair

customdeploy_nx_repair_userevent

Invoice

customdeploy_nx_invoice_userevent

Item Fulfillment

customdeploy_nx_itemfulfill_userevent

Opportunity

customdeploy_nx_opportunity_userevent

Project

customdeploy_nx_project_userevent

Project Task

customdeploy_nx_projecttask_userevent

Quote

customdeploy_nx_quote_userevent

Sales Order

customdeploy_nx_salesorder_userevent

Service

customdeploy_nx_serviceitem_userevent

Service Order/Case

customdeploy_nx_case_userevent

Subsidiary

customdeploy_nx_subsidiary_userevent

Task

customdeploy_nx_task_userevent

Time

customdeploy_nx_time_userevent

Transfer Order

customdeploy_nx_transferorder_userevent

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"
    }
  } 

            
Warning:

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:

  1. 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.

  2. After you create the role, note its internal ID.

  3. 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.

  4. 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.

Note:

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.

General Notices