MobileDeepLinkGenerator - Global
The MobileDeepLinkGenerator script include provides methods to embed a link to a mobile app list or form applet.
- Now Mobile
- Mobile Agent
- Mobile Onboarding
The Mobile Onboarding application is being deprecated!
With the ServiceNow AI Platform Rome release in September 2021, we started phasing out support for the Mobile Onboarding application. Customers may no longer activate it, and we are not offering enhancements or non-critical bug fixes. Mobile onboarding features are available in the Now Mobile app for HR Service Delivery.
For an example of this API used in a push notification, see Configure push notification message content. For additional information on deep links, see Deep linking for mobile.
MobileDeepLinkGenerator - MobileDeepLinkGenerator(String clientType)
Instantiates a MobileDeepLinkGenerator object for a specific mobile app.
| Name | Type | Description |
|---|---|---|
| clientType | String | Name of the app to create a link to. Options include:
|
The Mobile Onboarding application is being deprecated!
With the ServiceNow AI Platform Rome release in September 2021, we started phasing out support for the Mobile Onboarding application. Customers may no longer activate it, and we are not offering enhancements or non-critical bug fixes. Mobile onboarding features are available in the Now Mobile app for HR Service Delivery.
var glide = new global.MobileDeepLinkGenerator('onboarding');
MobileDeepLinkGenerator - getFormScreenLink(String formScreenId, String tableName, String recordSysId)
Create a link to a form applet.
| Name | Type | Description |
|---|---|---|
| formScreenId | String | Sys ID of the applet record in the Applets [sys_sg_screen] table. |
| tableName | String | Name of the table containing the record in the recordSysId parameter. |
| recordSysId | String | Sys ID of the record to open in the applet. |
| Type | Description |
|---|---|
| String | Link to the record in the mobile app form applet. |
var deepLinkGenerator = new global.MobileDeepLinkGenerator("agent");
var link = deepLinkGenerator.getFormScreenLink("<sys_id>", current.getTableName(), current.getValue("sys_id"));
MobileDeepLinkGenerator - getScreenLink(String documentId, Object uiParams)
Create a link to a list applet.
| Name | Type | Description |
|---|---|---|
| documentId | String | Sys ID of the applet record in the Applets [sys_sg_screen] table. |
| uiParams | Object | Optional. JSON object containing any URL parameters to include in the link.
Determine which URL parameters to include by inspecting the URL you want to link to.
In general, URL parameters filter records in the list. For example, var
param = {'<company-sys-id>': 'servicenow'}, where
<company-sys-id> is the Sys ID of a company UI parameter from
the UI Parameters [sys_sg_ui_parameter] table for a specific mobile screen. |
| Type | Description |
|---|---|
| String | Link to the mobile app list applet. |
var uiParams = {
"b250294ab3c12300a0d56ad4c6a8dc8c": "servicenow",
"7250294ab3c12300a0d56ad4c6a8dc90": "santa clara"}
var deepLinkGenerator = new global.MobileDeepLinkGenerator("request");
var link = deepLinkGenerator.getScreenLink("a75df1920f2033001befa68ca8767e50", uiParams);