{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":851,"path":"api-reference/server-api-reference/MobileDeepLinkGeneratorAPI.md","title":"MobileDeepLinkGenerator - Global","bundle":null,"doc_type":null,"release":"australia","body":"\n# MobileDeepLinkGenerator- Global\n\nThe MobileDeepLinkGenerator script include provides methods to embed a link to a mobile app list or form applet.\n\nUse this script include in a global server-side script to create a link to a list or form applet within these apps:\n\n-   Now Mobile\n-   Mobile Agent\n\nFor example, create a link from an email, push notification, or Virtual Agent conversation that opens a record or list of records in the app. The form or list only includes data that the user has access rights to view.\n\nFor an example of this API used in a push notification, see [Configure push notification message content](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/mobile/config-push-notification-message-content.md). For additional information on deep links, see [Deep linking for mobile](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/mobile/deep-link-mobile.md).\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## MobileDeepLinkGenerator - MobileDeepLinkGenerator\\(String clientType\\)\n\nInstantiates a MobileDeepLinkGenerator object for a specific mobile app.\n\n<table id=\"table_fzm_gjr_vhb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nclientType\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the app to create a link to. Options:\n\n-   agent: Creates a link to a list or screen in the Mobile Agent app.\n-   request: Creates a link to a list or screen in the Now Mobile app.\n\n</td></tr></tbody>\n</table>```\nvar glide = new global.MobileDeepLinkGenerator('onboarding');\n```\n\n## MobileDeepLinkGenerator - getFormScreenLink\\(String formScreenId, String tableName, String recordSysId\\)\n\nCreate a link to a form applet.\n\n|Name|Type|Description|\n|----|----|-----------|\n|formScreenId|String|Sys ID of the applet record in the Applets \\[sys\\_sg\\_screen\\] table.|\n|tableName|String|Name of the table containing the record in the **recordSysId** parameter.|\n|recordSysId|String|Sys ID of the record to open in the applet.|\n\n|Type|Description|\n|----|-----------|\n|String|Link to the record in the mobile app form applet.|\n\n```\nvar deepLinkGenerator = new global.MobileDeepLinkGenerator(\"agent\");\nvar link = deepLinkGenerator.getFormScreenLink(\"<sys_id>\", current.getTableName(), current.getValue(\"sys_id\"));\n```\n\n## MobileDeepLinkGenerator - getScreenLink\\(String documentId, Object uiParams\\)\n\nCreate a link to a list applet.\n\n|Name|Type|Description|\n|----|----|-----------|\n|documentId|String|Sys ID of the applet record in the Applets \\[sys\\_sg\\_screen\\] table.|\n|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.|\n\n|Type|Description|\n|----|-----------|\n|String|Link to the mobile app list applet.|\n\n```\nvar uiParams = {\n    \"b250294ab3c12300a0d56ad4c6a8dc8c\": \"servicenow\", \n    \"7250294ab3c12300a0d56ad4c6a8dc90\": \"santa clara\"}\n\nvar deepLinkGenerator = new global.MobileDeepLinkGenerator(\"request\");\nvar link = deepLinkGenerator.getScreenLink(\"a75df1920f2033001befa68ca8767e50\", uiParams);\n```\n\n"}}