---
sourceDocument: Yokohama ServiceNow AI Platform Administration
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/platform-administration

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Links to records in email notifications

# Links to records in email notifications {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Adding the ${URI} parameter to an outbound email body or template
creates a link to a specific record.
When a user clicks the word LINK, the instance prompts the user to log in if not already logged in, and then redirects the user to the record specified in the URI.Figure 1. Link displayed by ${URI} parameter ![]()  
The ${URI} parameter has an extension called the ${URI+} format to specify additional arguments in the email link, such as sysparm terms, in addition to the automatically created URI. For example (whitespace added for improved readability):

    ${URI+&sysparm_scriptlet=current.assigned_to=gs.getUserID()
    &sysparm_scriptlet_condition=current.assigned_to.nil()
    &sysparm_view=incident_active}

This example executes the JavaScript:

    current.assigned_to=gs.getUserID()

when the condition of

    current.assigned_to.nil()

is satisfied. Additionally, the script sets the view to `incident_active`.

## Linking to a record in Workspace {#c_EnablingLinksToServiceNowRecords__link-to-workspace-record}

The `${URI}` and `${URI_REF}` variables don't apply to records
in Workspace. To link to a record in Workspace, create a mail
script and reference it in your notification. For more information on using mail scripts, see
[JavaScript in emails](https://www.servicenow.com/docs/Dg8dpQaWZ4p~KUgqQnhwYg "Create mail scripts in System Notifications > Email > Notification Email Script , and refer to them by using ${mail_script:script name} in the script field.").  
The mail script that you create should print a URL to the notification. The URL must have the following format:

    https://<instance_name>/now/workspace/<workspace_name>/record/<table_name>/<sys_id>

The following example script shows the logic that a mail script must include to create a link to a record in Workspace.

    // Dynamically construct an Agent Workspace URL and insert a link in the notification
      var agentURL = '<a href="' + gs.getProperty('glide.servlet.uri') + '/now/workspace/agent/record/'+ current.getTableName() + '/' + current.sys_id + '">' + current.number + '</a>';
      template.print(agentURL + "<br />");

* **[Enable links to records](https://www.servicenow.com/docs/c4_YRLHd_fQQ1KywYxuz5g)**   
  Adding the special ${URI} parameter to an outbound email body or template creates a link to a specific record.
* **[Change the link text](https://www.servicenow.com/docs/NP_nX_PwReIgqVEJS73Waw)**   
  To show the display value of the record as the link text instead of the word LINK, use the ${URI_REF} parameter instead of the ${URI} parameter.
* **[Link to related records](https://www.servicenow.com/docs/7E3~uKchU3gNAvSkRNHUdw)**   
  A notification can link to a related record by specifying a reference field in front of the ${URI} or ${URI_REF} parameters.
* **[Content page links in email notifications](https://www.servicenow.com/docs/fb02uJPim933bs6zpURYaA)**   
  Links to CMS pages can be put in notifications to make it easy for the reader to access the pages.

