FSM Automatic Record Naming

In Field Service Management (FSM), automatic record naming generates names for asset, case, project, and task records. FSM uses a naming formula for each record type and can update the name when a record is created or edited. The result depends on the record data and the automatic record naming configuration in your account.

How It Works

This section explains the records and rules involved in the feature.

Automatic Record Naming Conditions

Automatic record naming is configured by default for all four record types. FSM updates the Name field only when the formula produces a different name. The following table shows when automatic naming applies to each record type.

Record Type

Naming Condition

Asset

Applied by default without a condition.

Case

Case Type is selected.

Project

Type is selected.

Task

Task Type is selected.

Important:

Automatic record naming can replace a name you entered manually or a name supplied by a default value. Entering a name before automatic record naming becomes active doesn't prevent FSM from replacing it.

Key Behaviors

This section describes how the feature responds to different conditions and actions.

Name Field Behavior

When automatic record naming is active on an FSM form, you can't enter a value in the Name field. FSM displays a translated placeholder in that field. After you save, FSM generates the name if the naming conditions are met.

When you create a case, project, or task on an FSM form, you can enter a value in the Name field before selecting a type. This behavior applies with the default automatic record naming configuration. Selecting Case Type on a case, Type on a project, or Task Type on a task prevents manual entry in the Name field. If you entered a name before selecting a type, clearing the type restores that name and lets you enter a value again.

You still can't enter a value in the Name field when you select a different type. FSM applies the naming formula after you save.

For assets, automatic record naming is active by default without any record-data condition.

Default Name Formats

FSM uses the following components to generate names with the default formulas. If a generated name exceeds 80 characters, FSM keeps only the first 80 characters.

Record Type

Name Components

Asset

Item followed by the serial number or address

Case

Case type, case number, and asset

Project

Project type, Number or internal ID as described in Project Name Examples, and asset

Task

Task type, task number, and asset

For assets, if no serial number is available, FSM uses the address text. If neither a serial number nor address text is available, FSM uses the selected address.

FSM removes a matching parent item prefix and the colon separator, including its surrounding spaces, from the beginning of the item name. FSM also removes spaces from the beginning and end of the assembled asset name.

For information about asset address fields, see FSM Service Locations and Geocoding.

Initial Names and First Save

When you create a case, project, or task on an FSM form with its type selected, FSM supplies a temporary Name before saving. The default English placeholder is To Be Generated. FSM translates it for the user's language. The placeholder provides an initial name before the final generated name is available.

After the initial save, the record exists and has an internal ID. The Field Service User Event script applies the naming formula during afterSubmit, using the saved record data. It replaces the temporary Name with the generated result when the naming conditions are met.

The Name fields (title) on the supplied FSM forms for cases and tasks are required. Their placeholders provide a value for the first save. Projects use the Name field (companyname). When NetSuite project autonumbering is disabled, the temporary name includes a timestamp to make the name unique. Spaces separate the timestamp from the placeholder text.

The following examples show the initial placeholder and the resulting name. The record values are illustrative, and Asset is Pump A in each example.

Record

Initial Name

Naming Inputs

Generated Name

Project

To Be Generated plus spaces and a timestamp

Project Type Maintenance, Number PRJ-1007

Maintenance PRJ-1007 Pump A

Case

To Be Generated

Case Type Repair, Case Number (casenumber) 1042

Repair 1042 Pump A

Task

To Be Generated

Task Type Inspection, empty Number (custevent_nx_task_number) set to the task's internal ID 456 before naming

Inspection 456 Pump A

NetSuite Project Numbering

The Project Management setting in NetSuite affects project lists and autogenerated numbering sequences. For the feature differences, see Projects.

Project Management

NetSuite Project Behavior

Disabled (basic Projects)

Projects and customers are managed together. Autogenerated numbering does not create separate project and customer sequences.

Enabled

Projects and customers are managed in separate lists. Autogenerated numbering creates separate project and customer sequences.

NetSuite autogenerated numbering is a separate setting from FSM automatic naming. In both project modes, Project Name supplies Project ID when NetSuite autonumbering is not used. When autonumbering is used, NetSuite assigns Project ID from its numbering settings, separately from Project Name. See Creating a Basic Project Record and Creating a Project Record.

The default FSM naming formula uses the same fields in both modes: Name (companyname) and Number (entityid). Different NetSuite numbering settings can therefore change the identifier included in the generated Name. The Number suffix test and Internal ID fallback described in Project Name Examples still apply according to the values read by the formula.

Disabling Project Management can also alter custom project forms created or edited when Project Management was enabled. Review those forms after the change, as described in Enabling Project Features.

Project Name Examples

For projects, the default formula combines Project Type (custentity_nx_project_type), a project identifier, and Asset (custentity_nx_asset). FSM writes the result to the Name field (companyname).

The project identifier normally comes from the Number field (entityid). If Number ends with : followed by the current Name (companyname), the formula uses the project's Internal ID (internalid) instead. The separator is a colon with one space on each side. Otherwise, the formula uses the Number value unchanged.

In this form-creation sequence, the current Name at the first save is the temporary timestamped placeholder. If Number ends with : followed by that placeholder, the formula uses Internal ID instead of including the placeholder in the generated name.

For example, assume Project Type is Maintenance and Asset is Pump A. In the following illustrative examples, P represents the entire temporary Project Name, including its spaces and timestamp. The values shown are those read when the formula is evaluated.

Number (entityid)

Current Name (companyname)

Internal ID (internalid)

Identifier Used

Generated Name (companyname)

PRJ-1007

P

321

Number: PRJ-1007

Maintenance PRJ-1007 Pump A

Acme Ltd : P

P

321

Internal ID: 321

Maintenance 321 Pump A

PRJ-1007

Pump service

321

Number: PRJ-1007

Maintenance PRJ-1007 Pump A

Acme Ltd : Pump service

Pump service

321

Internal ID: 321

Maintenance 321 Pump A

Note:

The first two rows show creation on an FSM form. P is shorthand for the entire timestamped placeholder supplied by FSM. The Pump service rows show an existing project with no FSM Type whose earlier Name is still present when automatic naming becomes eligible. For example, with FSM automatic naming enabled, a noninteractive update sets Type to Maintenance and retains the nonempty Name. When you select Type on an FSM form, FSM replaces the earlier Name with its placeholder before saving. That form sequence uses the P examples.

In each row where Number ends with the separator followed by the current Name, FSM uses 321 as the identifier in the generated name.

Task Number on Creation and Copy

When you copy a task on an FSM form, FSM clears the Number field. When you save a task with an empty Number field, FSM sets it to the task's internal ID before generating the name.

Processing Model and Lifecycle

This section explains when processing occurs and what can affect its progress and results.

Automatic Record Naming Processing

The Field Service Client script (customscript_nx_client) controls the Name field when you select or clear a type on case, project, and task forms.

The Field Service User Event script (customscript_nx_userevent) prepares the temporary Name when an FSM form loads. For noninteractive create or edit events, it also supplies a placeholder before submission when Name is empty and automatic naming is active. After the original record save, the script applies the naming formula during afterSubmit for record creation or edits, including inline edits. The naming conditions must be met.

After saving, compare the stored name with the name expected from the configured formula and the record data. A matching stored name confirms the naming outcome. It doesn't, by itself, establish that a particular script execution generated that name. For script execution and monitoring information, see FSM Script Reference.

Automatic Record Naming Configuration

FSM configuration defines the naming formula for each record type. You can change the formula or disable automatic naming for an individual record type through its record model configuration. Formulas configured for your account can produce names that differ from the default formats. Disabling model automatic naming stops FSM from replacing the name through this feature on subsequent record creation or edits. It doesn't restore names already replaced.

For supported settings, examples, and verification, see Configuring FSM Automatic Record Naming.

Changing how the Name field behaves on forms doesn't disable model automatic naming. If model automatic naming remains enabled, FSM can still replace a manually entered name after saving when the naming conditions are met.

For the supported model settings, their placement, and an example of disabling automatic naming, see FSM Record Model Configuration. For the separate controls that prepare the Name field on forms, see FSM NetSuite View Configuration. For formula syntax and field mapping, see FSM Searches and Field Mapping.

General Notices