Configuring FSM Mobile Asset History

Configure routes/mobile.history to control the supplied History tab, which displays read-only Asset history in Mobile. FSM Mobile Asset History explains its behavior and the records it combines.

Include history in the matching CRM Task or Project Task event resource rule. The standard visibility condition requires options.asset or event.asset. Follow Selecting Resources for the shared rule structure. Do not replace an account's existing tab array with a one-tab example.

Properties and Defaults

The following table lists properties, default values, and effects for routes/mobile.history. Property paths are relative to this resource. Standard labels use FSM translations.

Property

Accepted Values and Units

Default Value

Effect

label, icon

Strings.

Translated History label; icon: "bookmark".

Changes tab presentation.

hidden

Boolean value or template tag that resolves to a Boolean value.

"${ !options.asset && !event.asset }".

Omits the resource when neither Asset context is available. Removing the condition does not supply an Asset.

remote

Boolean value.

true.

Retrieves articles separately on demand. Retain it for the supplied History experience.

readonly

Boolean value.

true.

Removes create, edit and delete actions. The combined history is not a supported general record-editing resource.

search

Boolean value.

true.

Enables server-assisted search on the History list. It does not add a search control to a task's detail page or add NetSuite filters.

article.sortby

Top-level mapped property name.

"date".

Orders combined server articles in ascending text order. This is separate from UI sorting and search-column sorting.

article.task

Named CRM Task search.

record: "task", all: true; selected Asset and Completed status.

Supplies CRM Task history. Retain number for the final filter and the task ID used to combine sources.

article.projecttask

Named Project Task search.

Included only when Project Management is enabled; record: "projecttask", all: true; selected Asset and Completed status.

Supplies Project Task history. Core omits assigned-technician and phone maps for this source.

article.inventory

Named Sales Order search.

record: "salesorder", all: true; line Asset matches the selected Asset.

Supplies rows containing items and quantities grouped by their CRM Task or Project Task identity. It does not read fulfillment quantities.

article.files

Named native-file search.

record: "file", all: true; service-upload folder matches the selected Asset.

Supplies file rows grouped by task identity extracted from the folder. It does not search the custom Field Service File associations.

element.inventory, element.files

Table elements.

Types "table".

Display the respective mapped arrays. Child elements identify their table through parent.

element.size

Number element, configured in bytes.

unit: "byte"; child of files.

Formats the file-size value supplied by the map. See Mapped Properties and Units.

element.<name>.column

Number or other accepted column value.

details: 1, date: 2; item/quantity: 1/2; filename/description/size: 1/2/3.

Changes list columns at the appropriate top level or table-child level.

The shared FSM Mobile Resource Properties Reference and FSM Mobile Element (Block) Reference define these reusable controls.

Mapped Properties and Units

The following table lists mapped properties, their standard sources, and their dependencies.

Mapped Property

Standard Source

Dependency

number

custevent_nx_task_number for both task sources.

Entries without a number are removed by the supplied History behavior.

date

CRM Task: Field Service Start Date, otherwise Start Date. Project Task: Start Date.

Supplies the Date element and the server's sortby property.

details, actions

details: source-specific summary formula. actions: custevent_nx_actions_taken.

Supply historical task content. The summaries can shorten Case details and messages.

assigned, phone

CRM Task: assigned#, employee.mobilephone.

Not supplied by the core Project Task map. Adding an element alone does not populate these values.

Inventory source id

Sales-order line Task (custcol_nx_task) or Project Task (custcol_nx_projecttask), with the corresponding record prefix.

Matches the relevant task article identity.

inventory

Array containing item and quantity.

Element children use parent: "inventory".

File source id

Task identity extracted from the service-upload folder.

Matches the completed task article; a file row alone is not a retained History entry.

files

Array containing name, document, description and size.

Element children use parent: "files". document supplies native ID and download address.

File description

Native description.

Can include metadata appended during upload; it differs from the Files tab's cleaned description map.

File size

Native documentsize, in KB, without conversion in the core History map.

The supplied Size element is configured as bytes. Keep this source/unit difference in view when changing the display; a byte-based map requires conversion.

The named sources are combined by matching task IDs. Generic named-source behavior and map flags are explained in FSM Searches and Field Mapping. History additionally removes combined entries without number through its supplied behavior.

Default JSON

Core resource controls and CRM Task selection fragment. Labels, detail formulas, other maps and the other named sources remain inherited; this is not the complete History definition.

            {
  "routes/mobile": {
    "history": {
      "icon": "bookmark",
      "hidden": "${ !options.asset && !event.asset }",
      "search": true,
      "remote": true,
      "readonly": true,
      "article": {
        "sortby": "date",
        "task": {
          "all": true,
          "record": "task",
          "filters": [
            ["custevent_nx_task_asset", "anyof", "${ options.asset || event.asset }"],
            "and",
            ["status", "is", "COMPLETE"]
          ],
          "map": {
            "number": "custevent_nx_task_number",
            "date": "formuladate:nvl({custevent_nx_start_date},{startdate})[date]",
            "actions": "custevent_nx_actions_taken",
            "assigned": "assigned#",
            "phone": "employee.mobilephone"
          }
        }
      }
    }
  }
} 

          

When Project Management is enabled, the core article.projecttask search uses the same filter array for the asset and status with record type "projecttask". Its date map is "startdate[date]".

Core inventory source at routes/mobile.history.article.inventory:

            {
  "all": true,
  "record": "salesorder",
  "filters": ["custcol_nx_asset", "anyof", "${ options.asset || event.asset }"],
  "map": {
    "id": "*formulatext:nvl2({custcol_nx_task}, 'task-'||{custcol_nx_task.id}, 'projecttask-'||{custcol_nx_projecttask.id})",
    "inventory": [
      {
        "item": "item#",
        "quantity": "quantity"
      }
    ]
  }
} 

          

Core file source at routes/mobile.history.article.files:

            {
  "all": true,
  "record": "file",
  "filters": [
    "formulatext:case when {folder} like '%task-%-${ options.asset || event.asset }-%' then 'T' else 'F' end",
    "is",
    "T"
  ],
  "map": {
    "id": "*formulatext:regexp_replace({folder}, '^([[:alpha:]]*-[[:digit:]]+).*', '\\1')",
    "files": [
      {
        "name": "name",
        "document": {
          "id": "=internalid",
          "url": "formulatext:'mobile/file/'||{internalid}"
        },
        "description": "description",
        "size": "documentsize"
      }
    ]
  }
} 

          

These formulas are reproduced as existing core mappings. Their presence is not proof of poor performance or an instruction to replace them. Use Reducing Formula Use for the shared decision rules; FSM Performance and Data Collection will cover measurement and captures.

Changing History Presentation and Coverage

To exchange the two principal list columns, merge this fragment:

            {
  "routes/mobile": {
    "history": {
      "element": {
        "date": { "column": 1 },
        "details": { "column": 2 }
      }
    }
  }
} 

          

To omit inventory history and its query, remove the named source and hide its table together:

            {
  "routes/mobile": {
    "history": {
      "article": {
        "inventory": null
      },
      "element": {
        "inventory": { "hidden": true }
      }
    }
  }
} 

          

The null removes the inherited source during configuration merging. Hiding the table alone does not remove its query. This change affects the History view; it does not delete Sales Order lines or disable Consumable processing.

Task filters can be narrowed for the intended historical scope. A replacement filter array must express that whole intended scope, including Asset and completion conditions where required. Changing only CRM Task selection leaves the Project Task source unchanged.

Changing the mapped file description can make its presentation consistent with Files. For example, use the Files tab's cleaned-description expression at history.article.files.map.files[0].description. The files map is an array: replace it with the complete required row map, retaining native file identity and download link. See Category-Labelled Files Tabs for that expression. Map units must also match the display: native KB values require multiplication by 1,024 when supplied to a byte-formatted Size element.

Additional Record Sources and Elements

The supplied History tab can be extended with additional record sources, mapped values and display elements. Each additional named source under routes/mobile.history.article needs its own record type, search filters and field map. Sources that add information to an existing task entry must return the matching task identity. The supplied final number filter continues to apply to the combined entries.

Define each additional display element manually under routes/mobile.history.element. Use an element name that matches the mapped value, and specify a suitable type and label. For repeating rows, define the table and its child elements, including their parent values. Adding a source or mapped value does not automatically create the elements needed to display it; adding an element does not automatically retrieve its data.

Additional sources and elements require configuration and maintenance and can affect runtime processing. The searches, mappings and element definitions must be configured and maintained together. Each additional source search can increase retrieval time and processing usage, and additional returned data can increase response size. Adding another displayed value from an existing source can use that source's map without requiring a separate source search.

Alternative History Tabs

FSM Mobile configuration also supports separate custom history tabs with their own record selection and presentation. The Service History custom-tab example, deployed in many accounts, demonstrates this approach: its servicehistory resource combines Sales Order, Install, Maintenance and Repair searches with manually defined display elements to present an alternative history view.

Custom history tabs use FSM Mobile's general configuration capabilities. Configure a separate resource rather than overriding routes/mobile.history. Define the custom resource under routes/mobile.<resource ID> and include its ID in the appropriate event resource rule. Its searches, maps and elements determine which records appear and how they are displayed. The example illustrates an alternative configuration; its record types and fields depend on the account's configuration.

Use Selecting Resources, FSM Mobile Resource Properties Reference, FSM Searches and Field Mapping and Configuring Elements for the shared configuration mechanisms.

Dependencies and Customization Limits

Keep the following dependencies and limits in mind when customizing History:

  • Retain readonly: true for the combined History view. Changing this flag alone does not provide supported editing for the combined record sources or nested tables.

  • Asset context comes from the requested Asset or event. Adding an unrelated property or element does not supply a valid record reference to these searches.

  • Task numbers, source IDs, array names and child-element parent values are different dependencies. Altering one without the corresponding maps can hide history or associate rows incorrectly.

  • The default file search depends on the service-upload folder naming used by Files. It is not a search of every native attachment or every Field Service File association.

  • A copied resource definition does not automatically retain the specialized final number filter. Use the supplied history resource for the overrides described here.

  • A resource-rule ID with a numeric suffix, such as history-1, resolves to the supplied history definition. Reusing that definition with a requested Asset context is different from copying its JSON under an unrelated resource name.

  • all: true applies to each named source. It does not remove NetSuite execution limits or prove that unrelated record types are covered.

When Changes Apply

Display controls apply when Mobile receives the revised resource definition. Source filters and maps affect subsequent History requests; they do not change the original task, transaction or file records. Removing history from a matching resource rule removes that tab for those jobs without deleting historical data.

Related Topics

General Notices