Setting Up Additional Fields on Custom Mobile Pages

NetSuite WMS enables you to customize mobile pages to save data to NetSuite transactions. When you add a field to a mobile page, you can save and display its value on a NetSuite transaction.

For example, you want to save an item’s country of origin to an item receipt when you receive an order through the app. You can add a country of origin field to the item receipt form and to a mobile page of the PO receiving mobile process. On the app, you can select or enter the country of origin when you receive an item. The app saves country of origin to the corresponding field on the item receipt.

Limitations

The following limitations apply to the types of data and fields you can set up on custom mobile pages:

  • You can only add text and dropdown fields.

  • You cannot add custom fields as required fields on transactions.

  • You cannot update data on sublist fields, but you can add a new entry to a sublist.

  • You can save data to transactions only.

  • You cannot save data to records, like item or bin records.

Prerequisites

The instructions in this topic use the country of origin example for setting up an additional field. To add a field to a mobile page, clone the standard mobile process first. On your custom mobile process, you can set up the text or dropdown field.

In this sample customization, the standard PO Receiving mobile process is cloned to create a custom PO Receiving process. For instructions on cloning a process, see Customizing Mobile Processes.

The following optional prerequisites depend on your business requirements:

  • If you want to save your data to a custom field, first make sure that you set it up on a NetSuite transaction. Create a custom transaction body field, and then apply it to the transaction. Take note of the ID of the new custom field, which you must set up for the corresponding field on the mobile page. To set up transaction body fields, see Creating Custom Transaction Body Fields.

    In this sample customization, a Country of Origin transaction body field is created and applied to the item receipt transaction. The ID of this custom field is custbody_countryoforigin.

  • If you want to display dynamic values in the additional field, you can set up its data source. The data source may depend on the type of field that you want to add, such as a dropdown or text box. Data sources for fields on mobile pages can be a saved search, sublist, or body fields of a record. You can create or choose a saved search and use its columns as your data source. If you want to use a record, you can create a RESTlet script that obtains the data from its body fields. To create saved searches, see Defining a Saved Search.

    In this sample customization, the additional field on the mobile page displays the countries in a dropdown list. A saved search is used as the source of these countries. On the mobile page, the country you select from the list is saved to the Country of Origin field on the item receipt.

  • SCM Mobile provides the following standard RESTlet for submitting data from additional fields

    • Script ID: customscript_mobile_rl_create_record

    • Deployment ID: customdeploy_mobile_rl_create_record

    If you want to set up your own RESTlet, you can create the RESTlet script and script deployment. For information about setting up RESTlets, see Deploying a RESTlet.

To set up additional fields on custom mobile pages:

  1. Access the custom mobile page on which you want to set up the additional field by doing the following:

    1. Using the Administrator role, go to Setup > Custom > Mobile - Applications.

    2. On the Mobile - Applications List, click View next to the mobile application.

    3. On the Mobile - Process List, click View next to the custom mobile process.

    4. On the Mobile - Process page, click the Pages subtab, and then click the name of the mobile page.

      For this sample customization, the field is set up on the Enter Quantity mobile page named poReceiving_quantityScan_.

  2. On the Mobile - Page page, click the Page Elements subtab, and then click New Mobile - Page Element.

    A new page element is added to the Enter Quantity mobile page. It captures the data for the Country of Origin field that is displayed on the item receipt transaction.

  3. On the Mobile - Page Element page, to set up the new page element, set values in the following fields:

    Note:

    The page element settings in the next steps apply to Drop Down elements. For the list of fields for Text Box elements, see Configuring Mobile Page Elements.

    Field

    Description

    Sample Value

    Name

    Enter a unique name for the page element.

    Following the default page element naming convention: poReceiving_quantityScan_countryOfOrigin

    Type

    Select the supported page element type: Drop Down or Text Box.

    The other fields that appear on this page depend on the element type that you select.

    Drop Down

    Label

    Select the field label you want to show on the mobile page. Alternatively, to add a new label, click the new icon.

    Country of Origin

  4. Depending on the type of page element, to set up the data source for the additional field, do the following:

    Field

    Description

    Sample Value

    Input ID

    In these fields, set up the data source for the dropdown list, as follows:

    • In the Input ID field, enter the name of the column that contains the unique IDs for each value you want to include in the list. For static values, enter an array of unique identifiers for each value.

    • In the Input Value field, enter the name of the column that contains the actual values you want to display in the list. For static values, enter the actual values in an array.

    Internal ID

    The Internal ID column of the sample saved search results contains the internal IDs of the countries.

    Input Value

    Name

    The Name column of the sample saved search results contains the country names that are displayed in the dropdown list.

    On Load Action

    For dynamic values, set up the on load action that runs when the dropdown field loads on the mobile page:

    • In the On Load Action field, click the new icon to add a new mobile action. On the Mobile – Action page, enter the details of the data source.

    • In the Response Key field, enter data if the on load action is a saved search. For RESTlet on load actions, enter the key that contains its response.

    getCountryList

    On the Mobile – Action page, details of the sample saved search:

    • Name – getCountryList

    • Type – Saved Search

    • Saved Search – Custom Countries Search

    Response Key

    data

    For more information about setting up these fields, see Data Sourcing for Drop Down Elements.

  5. To set up the NetSuite transaction to which you want to save the data from the additional field, do the following:

    Field

    Description

    Sample Value

    Record Name

    Enter the ID of the transaction that contains the field in which you want to save the data.

    itemreceipt

    Field Name

    Enter the ID of the transaction body field in which you want to save the data.

    custbody_countryoforigin

    For more information about setting up these fields, see Data Capturing and Storage for Page Elements.

  6. To set up the RESTlet action that submits and saves data for your additional field, do the following:

    Note:

    In standard mobile processes, the last page of the process flow usually contains a button element that you can click to submit and save data. However, some processes also use table elements that can submit data when you click a row. Also, buttons and tables that submit data to NetSuite records might appear on other pages within the process flow. Depending on your process requirements, you can set up any or all of these page elements to submit data for your additional field.

    1. Access the. Mobile - Process page as you did in step 1.

    2. On the Pages subtab, click the name of the mobile page that contains the button or table element you want to set up.

      For this sample customization, the RESTlet action is set up on the button of the Enter Bin mobile page named poReceiving_enterBin_. This page is last page of the standard PO receiving process.

    3. On the Mobile - Page page, click the Page Elements subtab, and then click the name of the button or table element.

      In this sample customization, the Enter Bin button element, named poReceiving_enterBin_, contains the mobile action for submitting data to NetSuite records.

    4. On the Mobile - Page Element page, in the On Click Action field, click the link for the mobile action.

      Tip:

      For button elements, you can set up the RESTlet in the On Click Action. For table elements, you can set it up in the On Row Click Action.

      For this sample customization, the button’s On Click Action is named poReceiving_validateBinAndSubmit.

    5. On the Mobile - Action page, click Edit.

      This On Click Action has the Submit Form type of mobile action. You can also set up a Forward Form type of action to submit data for your additional field. For more information about mobile actions, see Mobile Actions for Page Validation and Navigation.

    6. Beside the After Action Restlet field, click the new icon.

    7. On the new Mobile - Action page, enter or select values in the following fields:

      Field

      Description

      Sample Value

      Name

      Enter a unique name for the Restlet action.

      updateAdditionalData

      Type

      Select Restlet.

       

      HTTP Method

      Select POST.

       

      Script ID

      Enter the ID of the RESTlet script.

      customscript_mobile_rl_create_record

      For your mobile action, you can also use this standard RESTlet script, which submits additional data in NetSuite records.

      Deployment ID

      Enter the ID of the deployment for the RESTlet script.

      customdeploy_mobile_rl_create_record

      For your mobile action, you can also use this standard deployment for the standard RESTlet script.

    8. Click Save.

    Repeat this step if you want to set up another page element on the same page or a different page within the same mobile process. You can set up the same RESTlet in the After Action Restlet of other mobile actions.

  7. After you save your customizations for the pages, page elements, and mobile actions, you must apply the updates to the app. Complete the following steps:

    1. Go to Setup > Custom > Mobile - Applications.

    2. On the Mobile - Applications List, click the Update App link next to the mobile application.

    3. To view the status of your update, click the link on the banner message at the top of the page.

      Wait for the confirmation message to appear or for the update to complete before you use the app.

Related Topics

General Notices