Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to force Incident/Request record links to always open in SOW?

savaliya
Tera Expert

Hi everyone,
I need to ensure that whenever a user opens an Incident, Request, or similar ticket - the record always opens in SOW, not the classic UI.

Right now, links opened from outside SOW still route to the classic view.

What’s the best way to globally redirect these record to SOW?

Thanks

1 REPLY 1

tiagomacul
Giga Sage
  • To redirect non-admin users to the Service Operations Workspace in ServiceNow, an admin must enable Next Experience and configure the landing page redirection in the Service Operations Workspace Admin Center. This involves setting the Homepage Destination Rule for SOW and updating relevant system properties to control the landing page behavior .
  • You can target specific users (by role or group) for redirection to SOW by configuring audience criteria in the Landing page redirection settings. This ensures only chosen users are redirected to the workspace for consulting incidents and requirements .
  • If you need to redirect records from dashboards or lists to a specific workspace (such as SOW for incidents), you can set up route configurations, UX page properties, route mappings, and navigation handlers. This approach ensures that clicking a record in a report or dashboard always opens it in the designated workspace .
  • For managing instance redirection or toggling, consider using the "Instance Toggle" action to specify which instance an alias should point to and what data should be copied over Instance Toggle.

Relevant resources:

 

This technique intercepts the Classic UI form URL on the server side and rewrites it to the correct Workspace URL.

1. Navigate and Create the Handler

  1. Access Navigation Handler: In the Application Navigator filter, type sys_navigator.list and press Enter.

  2. Create a New Record: Click New.

2. Configuration (Example for Incident)

You must create a separate handler record for each table that requires redirection (Incident, Request Item, etc.).

Field Value
Table Incident (incident)
Script Insert the code below.

3. Script for Record Redirection

This script checks if the link is trying to open a specific record and, if so, constructs the correct Workspace URL.

JavaScript
 
(function() {
    // 1. Get the sys_id of the record the user tried to open in the Classic UI
    var sysId = g_request.getParameter('sys_id');
    
    // 2. Check if a specific view is being requested (e.g., for related lists)
    var view = g_request.getParameter('sysparm_view');
    if (!gs.nil(view) && view !== 'default') { 
        // Do not redirect if a specific view is forced (keeps Classic behavior)
        return '';
    }

    // 3. If a sys_id is present, build the Workspace URL
    if (!gs.nil(sysId)) {
        // ATTENTION: Confirm 'sow' is the path for your UX Page.
        // The format is /now/[workspace_path]/record/[table]/[sys_id]
        return 'nav_to.do? uri=/now/sow/record/incident/' + sysId; 
    }
    
    // If it's not a specific record (e.g., opening a list), do not redirect.
    return ''; 
})();