Redirecting from HR Workspace to HR Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi,
We have a requirement to redirect the user to HR Agent Workspace from HR Workspace
We have configured a UI Script with the below code but its not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
try this UI script
How to Disable Agent Workspace After Migrating to Service Operations Workspace (SOW)
addLoadEvent(function() {
if (document.URL.indexOf('workspace/hr') != -1) {
window.location = '/now/hr/agent/home';
} else {
return;
}
});
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
share your UI script config screenshot.
it should work fine, if you gave correct URL for old workspace
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited an hour ago
Hi Swathi Sree
Under your script , add this one
if (window.location.href.includes('your_old_hr_workspace_url')) { top.window.location = "/now/hr/agent/home"; // The URL of the new HR Agent Workspace }
