Need to set Auto Re-direct old Workspace to new Workspace

Bird1
Mega Sage

Hello,

 

We have plan to migrate end-user from using old Agent Workspace to the new Agent Workspace. We know that we can deactivate the old module but some of users, they may already bookmarked the link, so it still can route them to the old one.

 

Question: If we would like to set Auto Re-direct from old Agent Workspace to new Agent Workspace, what should be the best solution to achieve it?

 

Old Agent Workspace: https://abc.service-now.com/now/workspace/hr

New Agent Workspace: https://abc.service-now.com/now/hr/agent/home

1 ACCEPTED SOLUTION

Chaitanya ILCR
Kilo Patron

Hi @Bird1 ,

 

Create a Global UI script

refer this support article

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1637948

 

addLoadEvent(function() {

    if (document.URL.indexOf('workspace/hr') != -1) {
        window.location = '/now/hr/agent/home';
    } else {
        return;
    }

});

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

View solution in original post

3 REPLIES 3

Chaitanya ILCR
Kilo Patron

Hi @Bird1 ,

 

Create a Global UI script

refer this support article

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1637948

 

addLoadEvent(function() {

    if (document.URL.indexOf('workspace/hr') != -1) {
        window.location = '/now/hr/agent/home';
    } else {
        return;
    }

});

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

Ankur Bawiskar
Tera Patron
Tera Patron

@Bird1 

you can use UI script and check the URL and then redirect.

something like this

addLoadEvent(function() {

    if (window.location.indexOf('/now/workspace/hr') > -1) {
       window.location.href = '/now/hr/agent/home';
    }

});

AnkurBawiskar_0-1742314343977.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Bird1 

Thank you for marking my response as helpful.

As per new community feature you can mark multiple responses as correct.

If my response helped please mark it correct as well so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader