Mobile Element Types
Valid Mobile Element Types
When configuring custom mobile tabs (or modifying core mobile tabs), part of the configuration process involves defining elements to represent fields that the user will interact with. Elements on the Field Service mobile app can be set to be one of a specific list of types; here we list those types.
All NetSuite field types are represented as element types on the Field Service mobile app and most element types listed below correspond with a clear NetSuite field type.
Mobile Element Type |
NetSuite Field Type |
Usage |
Defaults |
---|---|---|---|
checkbox |
Checkbox |
|
— |
text |
Free-Form Text |
|
— |
textarea |
Text Area |
|
|
help |
Help |
|
|
longtext |
Long Text |
|
|
signature |
Rich Text |
|
|
html |
Inline HTML |
|
— |
richtext |
Rich Text |
|
|
inlinehtml |
Inline HTML |
|
|
select |
List/Record |
|
— |
multiselect |
Multiple Select |
|
|
image |
Image |
|
|
file |
Document |
|
— |
document |
Document |
|
— |
date |
Date |
|
— |
datetime |
Date Time |
|
|
datetimetz |
Date Time |
|
|
time |
Time |
|
— |
timeofday |
Time |
|
— |
number |
Decimal |
|
— |
float |
Decimal |
|
|
integer |
Integer Number |
|
|
percent |
Percent |
|
|
currency |
Currency |
|
|
tel |
Phone Number |
|
— |
phone |
Phone Number |
|
— |
password |
Password |
|
— |
|
|
|
— |
url |
Hyperlink |
|
— |
hidden
Note:
Hidden elements do not appear on the mobile but they can successfully read and write to NetSuite. |
any simple NetSuite field type |
|
— |
table
Note:
Table elements are used as parents of other elements. While they don’t directly match a NetSuite field type they often instead align with a NetSuite sublist. |
no matching NetSuite field type |
|
— |
datalist
Note:
Datalist elements do not appear on the mobile but they can be used to store information used by other elements. |
no matching NetSuite field type |
|
— |
Mapping Patterns
When considering to map these elements through to their corresponding fields in NetSuite (as defined in the "article
" section of the config for a mobile tab) the following patterns should be followed.
Most element types if not listed below will follow this basic structure:
"article": {
"map": {
"elementid1": "fieldid1"
}
}
What follows are the exceptions to the simple structure above.
Select Fields
"article": {
"map": {
"elementid1": {
"id": "=fieldid1",
"label": "#fieldid1|"
}
}
}
Multi-Select Fields
"article": {
"map": {
"elementid1": {
"id": "=fieldid1[]",
"label": "#fieldid1[]|"
}
}
}
HTML and Inline HTML Fields
"article": {
"map": {
"elementid1": "fieldid1|"
}
}
Image, File, and Document Fields
"article": {
"map": {
"elementid1": {
"id": "=fieldid1",
"url": "formulatext:'${ url }file/'||{fieldid1.id}||'&key=${ user.key }'"
}
}
}
Datalist Elements
"article": {
"map": {
"elementid1": "fieldid1|"
}
}
Table Elements
"article": {
"map": {
"elementid1": [{
"subelementid1": "colfieldid1|sublistid.colfieldid1",
"subelementid2": "colfieldid2|sublistid.colfieldid2"
}]
}
}
Above that the child elements of a table element must have their mapping nested within the mapping for the table element.
Custom Forms and NetSuite Field Types
If a mobile tab loads it’s elements using a custom form, the type of those elements is evaluated based on the NetSuite field type of the corresponding field. There are some exceptions to this rule.
Image & Document fields in NetSuite both default to being "document
" type elements on the Field Service Management mobile. This can be overridden by making sure the field/element id ends with a specific code:
-
Ending the field id in
_doc
or_document
will cause the resultant element to be displayed as a "file
" type element unless otherwise overridden. -
Ending the field id in
_img
or_image
will cause the resultant element to be displayed as an "image
" type element unless otherwise overridden.
Signature fields are unique in that they have no matching NetSuite field type. Rich Text type fields in NetSuite who’s field id ends in _signature
will be automatically displayed on the mobile as a "signature
" type element unless otherwise overridden.
Aliases and Related Element Types
Some of the element types above do not exist as real element types, some are simply shortcuts that can be used to quickly pre-set some default properties.
For example the "currency" element type under the hood is actually just a "number
" element with the "unit
": "usd
" and "step
": 0.01 properties pre-set.
Currency Shorthand Element:
"newcurrencyelement": {
"type": "currency",
"label": "A Currency Field"
}
Same as Number Element Below:
"newcurrencyelement": {
"type": "number",
"label": "A Currency Field",
"unit": "usd",
"step": 0.01
}
Here you will find a list of all element types that are aliases of a base product element type.
Base Element Type |
Shorthand Element Types |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|