Mobile Page Element APIs

The following APIs enable you to work with page elements and their data:

disableField(elementName)

Disables an element that is hidden from or displayed on a mobile page.

Parameters

  • elementName {string} [required] – Name of the page element you want to disable

Returns

  • void

enableField(elementName)

Enables an element that is hidden from or displayed on a mobile page.

Parameters

  • elementName {string} [required] – Name of the page element you want to enable

Returns

  • void

getElementSourceData(elementName)

Gets the source data of a dropdown, search grid, or data table element.

Parameters

  • elementName {string} [required] - Name of the page element that contains the source data

Returns

  • Returns the source data for the page element, usually an array of objects

getValueFromPage(elementName)

Gets the value of an element on a mobile page.

Parameters

  • elementName {string} [required] – Name of the page element that contains the value

Returns

  • The value of the page element, in the element’s data type

hideField(elementName)

Hides an enabled or disabled element from a mobile page.

Parameters

  • elementName {string} [required] – Name of the page element you want to hide from a mobile

Returns

  • void

setElementSourceData(elementName, sourceData)

Sets the source data of a dropdown or data table element.

Parameters

  • elementName {string} [required] - Name of the dropdown or data table element to which you want to assign the source data

  • sourceData {Array of objects} [required] – The source data you want to associate with the page element

Returns

  • void

setFocusOnElement(elementName)

Gives focus to any of the following input field elements on a mobile page: Textbox, Date, UOM, or Search Grid.

Parameters

  • elementName {string} [required] - Name of the element you want to assign the focus to

Returns

  • void

setValueInPage(elementName, value)

Sets the value of an element on a mobile page in the following ways:

  • For Action Button elements, it sets the button’s label.

  • For Data Table elements, it selects the row that contains the values.

  • For Data entry or selection elements, it sets the field value.

Note:

If no value is provided, it does not select any row from table elements or leaves data entry elements blank.

For the UOM element, the behavior depends on the value you provide:

  • String - Sets the value for the quantity.

  • Object - Sets the value for a single unit and quantity.

  • Array of Objects - Sets or adds rows of units and quantity values.

Note:

If no value is provided, it sets the default unit and leaves the quantity blank.

Parameters

  • elementName {string} [required] – Name of the page element to which you want to assign the value

  • value [optional] – Value you want to set in the element, in the element’s data type, as shown in the following table

Data Type

Page Element

Example

String

Action Button, Date, Dynamic Text, Search Grid

Textbox, UOM

Action Button example:

Enter Item

Dynamic Text example:

                      Preferred bin {{state:dataRecord:auxParams:prefBin}}
<br/>
Previous bin {{state:dataRecord:auxParams:prevBin}} 

                    

Object

Data Table, Date, Drop Down, Search Grid, UOM

Date example:

                      {"value": "29-JUN-2021", "format": "DD-MMM-YYYY"} 

                    

Drop Down example:

                      {"label": "Good", "key": "1"} 

                    

Array

Multi-Select Data Table

Multi-Select Data Table example:

                      [{"poid": "PO 01", "#items": 4, "qty": 10},{"poid": "PO 02", "#items": 5, "qty": 5}] 

                    

UOM

UOM example:

                      [{value: 1, unit: '1'}, {value: 2, unit: '2'}] 

                    

Returns

  • void

showField(elementName)

Displays an enabled or disabled element on a mobile page.

Parameters

  • elementName {string} [required] – Name of the page element you want to show on a mobile page

Returns

  • void

Related Topics

NetSuite WMS Setup
Mobile App Setup
Mobile Device Basics for NetSuite WMS
Customizing Mobile Processes
Mobile Configuration and Customization

General Notices