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

                      "newcheckboxfield": {
  "type": "checkbox",
  "label": "A Checkbox Field"
} 

                    

text

Free-Form Text

                      "newtextfield": {
  "type": "text",
  "label": "A Text Field"
} 

                    

textarea

Text Area

                      "newtextfield": {
  "type": "text",
  "label": "A Text Field"
} 

                    

"maxlength" : 4000

"rows" : 6

help

Help

                      "newhelpfield": {
  "type": "help",
  "label": "A Help Field"
} 

                    

"maxlength" : 4000

"rows" : 6

"readonly" : true

longtext

Long Text

                      "newlongtextfield": {
  "type": "longtext",
  "label": "A Long Text Field"
} 

                    

"maxlength" : 1000000

"rows" : 12

signature

Rich Text

                      "newsignaturefield": {
  "type": "signature",
  "label": "A Signature Field"
} 

                    

"height" : 148

"width" : 448

html

Inline HTML

                      "newhtmlfield": {
  "type": "html",
  "label": "A HTML Field"
} 

                    

richtext

Rich Text

                      "newrichtextfield": {
  "type": "richtext",
  "label": "A Rich Text Field"
} 

                    

"maxlength" : 1000000

"rows" : 12

inlinehtml

Inline HTML

                      "newinlinehtmlfield": {
  "type": "inlinehtml",
  "label": "An Inline HTML Field"
} 

                    

"readonly" : true

select

List/Record

                      "newselectfield": {
  "type": "select",
  "label": "A Select Field"
} 

                    

multiselect

Multiple Select

                      "newmultiselectfield": {
  "type": "multiselect",
  "label": "A Multi-Select Field"
} 

                    

"multiple" : true

image

Image

                      "newimagefield": {
  "type": "image",
  "label": "An Image Field"
} 

                    

"accept": ".bmp,.gif,.jpg,.jpeg,.pjpg,.pjpeg,.png,.tiff,.tif"

file

Document

                      "newfilefield": {
  "type": "file",
  "label": "A File Field"
} 

                    

document

Document

                      "newdocumentfield": {
  "type": "document",
  "label": "A Document Field"
} 

                    

date

Date

                      "newdatefield": {
  "type": "date",
  "label": "A Date Field"
} 

                    

datetime

Date Time

                      "newdatetimefield": {
  "type": "datetime",
  "label": "A Date Time Field"
} 

                    

"step" : 60

datetimetz

Date Time

                      "newdatetimetzfield": {
  "type": "datetimetz",
  "label": "A Date Time TZ Field"
} 

                    

"step" : 60

time

Time

                      "newtimefield": {
  "type": "time",
  "label": "A Time Field"
} 

                    

timeofday

Time

                      "newtimeofdayfield": {
  "type": "timeofday",
  "label": "A Time Of Day Field"
} 

                    

number

Decimal

                      "newnumberfield": {
  "type": "number",
  "label": "A Number Field"
} 

                    

float

Decimal

                      "newfloatfield": {
  "type": "float",
  "label": "A Float Field"
} 

                    

"step" : "any"

integer

Integer Number

                      "newintegerfield": {
  "type": "integer",
  "label": "An Integer Field"
} 

                    

"precision" : 0

"step" : 1

percent

Percent

                      "newpercentfield": {
  "type": "percent",
  "label": "A Percent Field"
} 

                    

"unit" : "percent"

"step" : "any"

currency

Currency

                      "newcurrencyfield": {
  "type": "currency",
  "label": "A Currency Field"
} 

                    

"unit" : "usd"

"step" : 0.01

tel

Phone Number

                      "newtelfield": {
  "type": "tel",
  "label": "A Telephone Field"
} 

                    

phone

Phone Number

                      "newphonefield": {
  "type": "phone",
  "label": "A Phone Field"
} 

                    

password

Password

                      "newpasswordfield": {
  "type": "password",
  "label": "A Password Field"
} 

                    

email

Email

                      "newemailfield": {
  "type": "email",
  "label": "An Email Field"
} 

                    

url

Hyperlink

                      "newurlfield": {
  "type": "url",
  "label": "A URL Field"
} 

                    

hidden

Note:

Hidden elements do not appear on the mobile but they can successfully read and write to NetSuite.

any simple NetSuite field type

                      "newhiddenfield": {
  "type": "hidden",
  "label": "A Hidden Field"
} 

                    

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

                      "newtable": {
  "type": "table",
  "label": "A Table"
} 

                    

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

                      "newdatalistfield": {
  "type": "datalist",
  "label": "A Datalist"
} 

                    

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}||'&key=${ user.key }'"
    }
  }
} 

          

Datalist Elements

            "article": {
  "map": {
    "elementid1": "fieldid1|"
  }
} 

          

Table Elements

            "article": {
  "map": {
    "elementid1": [{
      "subelementid1": "colfieldid1|sublistid.colfieldid1",
      "subelementid2": "colfieldid2|sublistid.colfieldid2"
    }]
  }
} 

          
Note:

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

textarea

help, longtext

html

inlinehtml, richtext

number

float, integer, percent, currency

select

multiselect

tel

phone

file

document

datetime

datetimetz

time

timeofday

General Notices