How to setup default home page for itil users?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 12:12 AM - edited 12-08-2022 03:41 AM
I want to setup default home page as agent workspace for ITIL users. How could I achieve that!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 06:26 AM - edited 12-09-2022 06:32 AM
Add the following lines of code to the getFirstPageURL function of the SPEntryPage script include:
if(gs.hasRole('itil')){ // note you will need to identify and change what role you want to redirect to agent workspace
return '/now/workspace/agent/home';
}
If you are on Next Experience follow this article:
If this helps please mark as Helpful/Correct
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2022 08:54 PM
Hello @Paul Curwen
I wrote this below script in the SPEntryPage script include:
var gScript = new globalServerUtils();
if(gScript.hasRoleExactly('itil') && session.getClientData('newLogin') != 'false'){
session.putClientData('newLogin', 'false');
gs.info('Running SPEntry Page'+session.getClientData('myData'));
return "/now/workspace/agent/home";
}
if (user.hasRoles() && !redirectURL && !isServicePortalURL)
return;
But what happened is, there is one sys property which we created to turn on/off the next experience on user preference.
I think, Because of that whenever the itil user loggedin to the servicenow it's not redirecting to agent workspace. Instead of that it's redirecting to "/now/nav/ui/home" .
So how could i add script to work it as expected.