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 |
|
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 |
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 |
|---|---|---|---|
|
|
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 displayed for the resource. |
String. |
If omitted and |
|
|
Icon name displayed for the resource. |
String. |
|
|
|
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. |
|
|
Enables search on the Resource Index page. Filters loaded records for local resources or sends entered text to the server for remote resources. |
|
|
|
|
Treats the resource article as remote. The rendered resource does not include |
|
|
|
|
Convenience setting that removes create, edit, and delete permissions. It is consumed during rendering and is not returned as a resource property. |
|
|
|
|
Allows creation of articles. |
|
|
|
|
Allows editing of existing articles. |
|
|
|
|
Allows deletion of articles. |
|
|
|
|
Minimum number of valid articles required for the resource to be complete. |
Number. |
|
|
|
Article count at which FSM Mobile stops offering creation of another article. The count includes both valid and invalid existing articles. |
Number. |
|
|
|
Dependencies that must all be complete before the resource is enabled. A dependency can be another resource ID, |
String or array of strings. |
No dependencies. |
|
|
Dependencies that must all be complete before the resource is disabled. A dependency can be another resource ID, |
String or array of strings. |
No dependencies. |
|
|
Prevents the resource from being rendered when |
|
|
|
|
Adds a default article |
|
|
|
|
Defines the record model and article data for the resource. See Article Properties. |
Object or array. |
|
|
|
Defines the elements included in the resource. Each property name is an element name and its value is an element definition. |
Object. |
|
|
|
Loads a NetSuite form and converts its fields to elements before merging explicit |
|
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 |
|---|---|---|---|
|
|
NetSuite record type used by the article model. |
Record type ID string, such as |
No default. |
|
|
Selects the article model base. |
|
Standard record base. |
|
|
NetSuite search filter expression used to retrieve articles. |
Filter expression object or array, an internal ID or array of IDs, or |
No explicitly configured filters. Effective filtering depends on parent, request, and record-model/search defaults. |
|
|
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 |
|
|
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. |
|
|
Maps NetSuite fields or formulas to article attributes and element values. |
Object. Each map entry uses the FSM Mobile record-map syntax. |
|
|
|
Values used when a NetSuite article is created. |
Object. |
No defaults, except the default supplied by |
|
|
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. |
|
|
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:
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 type whose form is loaded. |
Record type ID string. |
|
|
|
NetSuite custom form internal ID used to initialize the record. |
Number or numeric string. |
No explicit custom form. |
|
|
Applies the FSM user-event ordering before fields are read. |
|
|
|
|
Loads available options for NetSuite select and multiselect fields. |
|
|
|
|
Includes hidden NetSuite form fields in the generated element set. |
|
|
|
|
Uses a copied record, when one exists, to include Inline Text field settings that are unavailable on a new record. |
|
|
|
|
Restricts generated elements to these NetSuite field IDs. |
Array of field ID strings. |
All form fields, subject to exclusions. |
|
|
Excludes these NetSuite field IDs from generated elements. The renderer also excludes the article |
Array of field ID strings. |
No configured exclusions. System fields are always excluded. |
|
|
Reuses the generated form for the same complete form-options object during the server process. Set to |
|
|
|
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:
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 |
|---|---|---|
|
|
|
None |
|
|
|
|
|
|
|
None |
|
|
|
None |
|
|
|
None |
|
|
|
|
|
|
|
|
|
|
|
None |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
None |
|
|
|
A field ID matching the signature naming pattern becomes |
|
|
|
Options are included when |
|
|
|
|
|
|
|
|
|
|
|
None |
|
|
|
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 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
A title-cased label derived from |
|
|
|
|
|
|
|
|
|
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 lookup data used by other FSM Mobile resources. |
|
|
|
Current event record. Captures event details. |
|
|
|
Service-history data for an asset. |
|
|
|
Contact and customer-contact lookup models. |
|
|
Hidden when no current or requested asset. |
|
|
|
|
Sales order transaction. |
|
|
|
Consumable usage records. |
|
|
|
|
|
|
|
Expense report transaction. |
|
|
|
|
|
|
|
|
|
|
|
Task/action article configuration. |
|
|
|
Estimate/quote transaction. |
|
|
|
Transfer order transaction. |
|
|
|
Return transfer order transaction. |
|
|
|
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
- FSM Mobile Element (Block) Reference
- FSM Expressions and Template Tags
- FSM Searches and Field Mapping
-
FSM Performance and Data Collection - performance measurement and collection of requests, responses, and relevant logs.