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 |
|---|---|---|---|
|
|
Strings. |
Translated History label; |
Changes tab presentation. |
|
|
Boolean value or template tag that resolves to a Boolean value. |
|
Omits the resource when neither Asset context is available. Removing the condition does not supply an Asset. |
|
|
Boolean value. |
|
Retrieves articles separately on demand. Retain it for the supplied History experience. |
|
|
Boolean value. |
|
Removes create, edit and delete actions. The combined history is not a supported general record-editing resource. |
|
|
Boolean value. |
|
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. |
|
|
Top-level mapped property name. |
|
Orders combined server articles in ascending text order. This is separate from UI sorting and search-column sorting. |
|
|
Named CRM Task search. |
|
Supplies CRM Task history. Retain |
|
|
Named Project Task search. |
Included only when Project Management is enabled; |
Supplies Project Task history. Core omits assigned-technician and phone maps for this source. |
|
|
Named Sales Order search. |
|
Supplies rows containing items and quantities grouped by their CRM Task or Project Task identity. It does not read fulfillment quantities. |
|
|
Named native-file search. |
|
Supplies file rows grouped by task identity extracted from the folder. It does not search the custom Field Service File associations. |
|
|
Table elements. |
Types |
Display the respective mapped arrays. Child elements identify their table through |
|
|
Number element, configured in bytes. |
|
Formats the file-size value supplied by the map. See Mapped Properties and Units. |
|
|
Number or other accepted column value. |
|
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 |
|---|---|---|
|
|
|
Entries without a number are removed by the supplied History behavior. |
|
|
CRM Task: Field Service Start Date, otherwise Start Date. Project Task: Start Date. |
Supplies the Date element and the server's |
|
|
|
Supply historical task content. The summaries can shorten Case details and messages. |
|
|
CRM Task: |
Not supplied by the core Project Task map. Adding an element alone does not populate these values. |
|
Inventory source |
Sales-order line Task ( |
Matches the relevant task article identity. |
|
|
Array containing |
Element children use |
|
File source |
Task identity extracted from the service-upload folder. |
Matches the completed task article; a file row alone is not a retained History entry. |
|
|
Array containing |
Element children use |
|
File |
Native |
Can include metadata appended during upload; it differs from the Files tab's cleaned description map. |
|
File |
Native |
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: truefor 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
parentvalues 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
numberfilter. Use the suppliedhistoryresource for the overrides described here. -
A resource-rule ID with a numeric suffix, such as
history-1, resolves to the suppliedhistorydefinition. Reusing that definition with a requested Asset context is different from copying its JSON under an unrelated resource name. -
all: trueapplies 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
- FSM Configuration Reference
-
FSM Mobile Asset History
- Configuring FSM Mobile File Management
-
FSM Asset Record
-
FSM CRM Task Record
- FSM Script Reference
-
FSM Performance and Data Collection - measuring History requests and returned data.