We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Link redirection in HR case

PreethiG6447769
Tera Contributor

Hi Team,

 

In HR case creation, native view page link when user bookmarks this below link and tries to create a new HR Case, when must show alert and redirect to workspace link.

 

Native link:

https://********.service-now.com/now/nav/ui/classic/params/target/sn_hr_core_case_creation.do%3Fsysp...

 

HR Workspace:

/now/hr/agent/case-creation-page/-1_uid_1/params/query/assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe%5Eactive%3Dtrue%5Estate!%3D20

PreethiG6447769_0-1770892892071.png

 

5 REPLIES 5

Ankur Bawiskar
Tera Patron

@PreethiG6447769 

So you don't want users to submit case from native?

if yes then disable the left nav module.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@Ankur Bawiskar , Module already disabled. Rare case if agents would have book marked and use the link we need to redirect.

@PreethiG6447769 

shared solution for that below.

please check and close the thread.

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

Ankur Bawiskar
Tera Patron

@PreethiG6447769 

This approach worked for me

1) create UI script like this

addLoadEvent(hideButtonsAdd);

function hideButtonsAdd() {
    if (document.URL.indexOf('sn_hr_core_case_creation.do') > -1) {
        window.location.href = '/now/hr/agent/case-creation-page/-1_uid_1';
    }

}

AnkurBawiskar_0-1770893801870.png

 

Output:

redirect to HR agent workspace from native.gif

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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