FSM Mobile Resource Properties Reference

Resource definitions supply tabs or related data sets in FSM Mobile. A resource can contain an article record definition, element definitions, or both. For element types, element properties, and values, see FSM Mobile Element (Block) Reference.

Resource Configuration Conventions

A resource definition is configured under routes/mobile. It can contain a record definition in article, an element definition in element, or both. The Mobile service renders the resource before it is sent to the app.

The following table defines the terms used in this topic.

Term

Meaning

Static value

A literal configuration value, such as true, "page", 1, or an object or array.

Default

The value applied by the product when the property is omitted. A default is not necessarily written back to the configuration.

Template tag

Server-side JavaScript in the form ${ ... }. The tag is evaluated during resource preparation for FSM Mobile.

All properties in the Resource Properties, Article Properties, and Form Properties tables accept template tags. A tag must resolve to a value accepted by the property, as shown in the Accepted Value column. For details about how template tags work, see FSM Expressions and Template Tags.

Resource Properties

The following properties are recognized on a resource definition.

Property

Description

Accepted Value

Default

id

Resource identifier. In normal FSM Mobile configuration, the resource key supplies the identifier. A rule can also supply an ID or an ID with a numeric suffix.

String.

No default.

label

Label displayed for the resource.

String.

If omitted and article.record is set, a title-cased label is derived from the record ID. Otherwise no label is added.

icon

Icon name displayed for the resource.

String.

"page".

parent

Parent resource ID for the client resource hierarchy. This is normally supplied by the resource rule rather than the base definition.

String.

The current event or user resource is used by the client when no parent is supplied.

search

Enables search on the Resource Index page. Filters loaded records for local resources or sends entered text to the server for remote resources.

true or false.

false.

remote

Treats the resource article as remote. The rendered resource does not include article. The client requests articles separately. You should pair remote: true with readonly: true.

true or false.

false.

readonly

Convenience setting that removes create, edit, and delete permissions. It is consumed during rendering and is not returned as a resource property.

true or false.

false (no permission override).

create

Allows creation of articles.

true or false.

true, unless readonly is true.

edit

Allows editing of existing articles.

true or false.

true, unless readonly is true.

delete

Allows deletion of articles.

true or false.

true, unless readonly is true.

min

Minimum number of valid articles required for the resource to be complete.

Number.

0.

max

Article count at which FSM Mobile stops offering creation of another article. The count includes both valid and invalid existing articles.

Number.

0 (no maximum enforced by the client).

enable

Dependencies that must all be complete before the resource is enabled. A dependency can be another resource ID, "commenced", or "completed".

String or array of strings.

No dependencies.

disable

Dependencies that must all be complete before the resource is disabled. A dependency can be another resource ID, "commenced", or "completed".

String or array of strings.

No dependencies.

hidden

Prevents the resource from being rendered when true.

true or false.

false.

automap

Adds a default article map entry for each top-level value-carrying element that does not already have one. The generated mappings are not returned in the rendered element definitions.

true or false.

false. Set automatically to true when form is used and automap is omitted.

article

Defines the record model and article data for the resource. See Article Properties.

Object or array.

[].

element

Defines the elements included in the resource. Each property name is an element name and its value is an element definition.

Object.

{}.

form

Loads a NetSuite form and converts its fields to elements before merging explicit element configuration over the generated definitions. See Form Properties.

true, an internal ID as a number or numeric string, or a form object. Setting form to false or omitting it skips form loading.

Not used.

The search property does not enable search within an individual record's detail page or define record search filters.

Permission Precedence

If readonly resolves to true, FSM Mobile sets create, edit, and delete to false, even if the permissions were configured as true. If readonly is absent or false, each permission defaults to true unless it is explicitly set to a Boolean value.

Article Counts and Completion

A saved article contributes to min only when its values pass resource-completion validation. max uses the total article count to control creation in FSM Mobile. It does not impose a NetSuite-wide record limit. For the validation rules, see Property Validation Rules.

Resource Dependencies

For enable, the resource remains disabled until every listed dependency is complete. For disable, the resource becomes disabled only when every listed dependency is complete. The special dependencies "commenced" and "completed" refer to the current event state. Other dependency values refer to resource IDs in the same FSM Mobile context.

Article Properties

article is the record-model definition used to read, create, update, or delete the resource's articles. It can be a single model definition, or an array where the resource supplies static article data. An article definition can also contain named source definitions without a direct record property.

Property

Description

Accepted Value

Default

record

NetSuite record type used by the article model.

Record type ID string, such as "timebill" or "customrecord_my_record".

No default.

extend

Selects the article model base.

"models/transaction" to use the transaction base. Other values use the standard record base.

Standard record base.

filters

NetSuite search filter expression used to retrieve articles.

Filter expression object or array, an internal ID or array of IDs, or true.

No explicitly configured filters. Effective filtering depends on parent, request, and record-model/search defaults.

filterby

Selects retrieved articles whose top-level mapped properties match all supplied comparison values. Applied after the search or search-cache retrieval. Does not group results or add NetSuite search conditions.

Object of mapped property names and individual comparison values.

No additional matching when absent from the effective article definition. Standard resources can supply filterby.

sortby

Sorts retrieved articles by a top-level mapped property in ascending text order, after combining named sources where present.

Mapped property name string.

No additional article-model sorting.

map

Maps NetSuite fields or formulas to article attributes and element values.

Object. Each map entry uses the FSM Mobile record-map syntax.

{} when automap creates entries. Otherwise no map is added.

defaults

Values used when a NetSuite article is created.

Object.

No defaults, except the default supplied by article.parent.

parent

NetSuite field ID that relates the article to the current event. Supplies a create default and, when article filters are omitted, a parent filter.

Field ID string.

No parent link.

resources

Nested resource-rule definitions associated with this article model. The resource renderer preserves this property when resolving the rest of a nested record definition.

Array of resource rules.

No nested resources.

Article models can also use record-model capabilities supplied by the configured model implementation, for example a model-specific sync function. These implementation extensions are not general resource properties or part of a portable configuration contract.

For filter and map syntax, filterby, search-cache reuse, article sorting, named sources, and Automap precedence, see FSM Searches and Field Mapping. That topic also explains the parent restriction to preserve when supplying custom filters.

Form Properties

Use form when the element definition should be created from a NetSuite custom form. FSM Mobile loads the form, converts the returned NetSuite fields to element definitions, then merges the configured element object over the converted fields. An explicit element definition therefore overrides the generated definition, including when an explicit element key is a regular-expression pattern.

Set form to true to load the record's form without specifying a custom form ID. An empty form object, or a form object without customform, also uses default record initialization. Other initialization properties in that object can affect the form and initial values. Set form to false, or omit it, to skip form loading.

A numeric form value is treated as the NetSuite custom form ID. For example:

Note:

Replace customrecord_my_inspection, 123, and custrecord_my_notes with the record type ID, custom form internal ID, and field ID from your account.

            {
  "article": { "record": "customrecord_my_inspection" },
  "form": 123,
  "element": {
    "custrecord_my_notes": { "type": "textarea", "rows": 6 }
  }
} 

          

The following properties are available when form is an object. Any other properties are passed as record-initialization values when the form loads.

Property

Description

Accepted Value

Default

record

Record type whose form is loaded.

Record type ID string.

article.record.

customform

NetSuite custom form internal ID used to initialize the record.

Number or numeric string.

No explicit custom form.

order

Applies the FSM user-event ordering before fields are read.

true or false.

true.

options

Loads available options for NetSuite select and multiselect fields.

true or false.

true.

hidden

Includes hidden NetSuite form fields in the generated element set.

true or false.

false.

inline

Uses a copied record, when one exists, to include Inline Text field settings that are unavailable on a new record.

true or false.

true.

include

Restricts generated elements to these NetSuite field IDs.

Array of field ID strings.

All form fields, subject to exclusions.

exclude

Excludes these NetSuite field IDs from generated elements. The renderer also excludes the article parent field when present.

Array of field ID strings.

No configured exclusions. System fields are always excluded.

cache

Reuses the generated form for the same complete form-options object during the server process. Set to false to load the form again.

true or false.

true.

Other initialization values

Values used to initialize the temporary NetSuite record from which fields are read.

Values valid for the selected record's fields.

Not set.

The form cache key is the complete form-options object. A cached form is reused only for a matching set of options. Setting cache to false bypasses both cache retrieval and storage. When order is not false, form loading may create or use the FSM user-event deployment for the selected record type. This processing can add measurable time to a fetch in FSM Mobile.

Pattern Overrides for Generated Elements

When form generates elements, a key in the resource's element object can be a regular-expression pattern that matches the generated field IDs. FSM applies the override properties defined for the pattern to each matching element. It does not create a separate element named after the pattern.

For example, this resource-definition fragment loads a form and makes the generated fields whose IDs begin with custrecord_inspection_ required:

Note:

Replace customrecord_my_inspection and custrecord_inspection_ with the record type ID and field prefix from your account.

              {
  "article": { "record": "customrecord_my_inspection" },
  "form": true,
  "element": {
    "^custrecord_inspection_": {
      "required": true
    }
  }
} 

            

The ^ anchors the match to the start of the field ID. This example changes matching form-generated elements. It does not define new fields or elements when no field matches.

For guidance on measuring resource-loading performance and capturing fetch data, see FSM Performance and Data Collection.

Form Field Translation

The custom-form loader translates these NetSuite field types to base FSM Mobile element types. Suffix rules are applied to NetSuite select fields before normal translation.

NetSuite Field Type or Rule

Generated FSM Mobile Element Type

Generated Properties or Behavior

checkbox

checkbox

None

currency

number

precision: 2, unit: "usd"

date

date

None

datetimetz

datetime

None

document, or a select field ending _doc or _document

file

None

float

number

precision: 8

help

textarea

map: "|", readonly: true

image, or a select field ending _img or _image

image

None

inlinehtml

html

map: "|", readonly: true

integer

number

precision: 0

longtext

textarea

maxlength: 1000000, rows: 12

multiselect

select

multiple: true. Options are included when form.options is not false.

password

password

map: "|"

percent

number

precision: 4, unit: "percent". The generated map reads a stored fraction as a percentage and writes it as a float.

phone

tel

None

richtext

signature or html

A field ID matching the signature naming pattern becomes signature. Otherwise it becomes html with maxlength: 1000000 and rows: 12.

select

select

Options are included when form.options is not false.

textarea

textarea

maxlength: 4000, rows: 6

text

text

maxlength: 300

timeofday

time

None

url

url

None

Unrecognized NetSuite field types are not converted into FSM Mobile elements. The generated elements then receive the normal element defaults documented in FSM Mobile Element (Block) Reference.

Runtime Defaults Applied to Every Resource

These defaults are applied by the resource renderer. These defaults are separate from explicitly configured properties and from article or element defaults.

Omitted Setting

Effective Result

element

{} before element processing.

article

[].

icon

"page".

label

A title-cased label derived from article.record, if present.

create, edit, delete

true, unless readonly is true.

search, remote, readonly

false in the FSM Mobile client.

min, max

0 in the FSM Mobile client.

Effective default properties for a resource with readonly: false (the label is derived at runtime):

            {
  "icon": "page",
  "element": {},
  "article": [],
  "create": true,
  "edit": true,
  "delete": true,
  "search": false,
  "remote": false,
  "readonly": false,
  "min": 0,
  "max": 0
} 

          

Out-of-the-Box Mobile Resources

The following resource definitions are supplied with FSM Mobile. This table lists their explicit resource-level settings and article record, not every element or article-map entry. Values not listed inherit the defaults described in Runtime Defaults Applied to Every Resource. Resources can be hidden when the associated NetSuite feature is unavailable.

Resource

Explicit Resource-Level Defaults

Article Record or Purpose

inventory

label only.

Inventory lookup data used by other FSM Mobile resources.

details

icon: "clipboard", min: 1, max: 1.

Current event record. Captures event details.

history

icon: "bookmark", hidden when no current or requested asset, search: true, remote: true, readonly: true.

Service-history data for an asset.

contact

icon: "torso", readonly: true.

Contact and customer-contact lookup models.

asset

Hidden when no current or requested asset. min: 1, max: 1.

customrecord_nx_asset. Shows an asset or child asset.

salesorder

icon: "wrench", max: 1.

Sales order transaction.

consumables

icon: "wrench".

Consumable usage records.

times

icon: "clock". disable: "completed" only when Project Management is enabled.

timebill. Time entry.

expenses

icon: "creditcard", max: 1.

Expense report transaction.

files

icon: "paperclip".

file. Task-related uploads and attachments.

notes

icon: "comment".

note. Task-related notes.

actions

icon: "checked".

Task/action article configuration.

quote

icon: "quote".

Estimate/quote transaction.

order

icon: "shoppingcart". Hidden when Locations is unavailable.

Transfer order transaction.

return

icon: "outbox". Hidden when Locations is unavailable.

Return transfer order transaction.

receive

icon: "inbox". Hidden when Locations is unavailable.

Item receipt transaction.

The shipped route also contains internal demonstration resources (blockdemo, griddemo, and performancedemo). These demonstration resources are not operational resources supplied with FSM Mobile and are excluded from this table.

Related Topics

General Notices