- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2025 07:17 AM
Hello Everyone,
I have received a requirement where we need to make the SOW (Service Operations Workspace) to be the default homepage for all ITIL users/particular groups.
Please advice me how can I suggest this.
Kind Regards,
Atanu Maity
atanumaity730@gmail.com
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 06:55 AM
@A_maity002 Please find the details below for routing it to Service Operations Workspace.
1. Navigate to Script Include -> SPEntryPage
2. Edit the "getFirstPageURL" function as below,
var roleCheck = new GlideRecord('sys_user_has_role');
roleCheck.addQuery('user', gs.getUserID());
roleCheck.addQuery('role','!=',gs.getProperty('internal.role'));
roleCheck.query();
if (roleCheck.getRowCount() > 0)
this.hasRoles = true;
if(gs.hasRole('admin')) {
return;
}
else if (gs.hasRole('itil')) {
return '/now/sow/home'; //Route to SOW if user has ITIL role
}
else {
if (!gs.hasRole('itil') && this.hasRoles) {
return 'now/nav/ui/home'; //Route to Homepage if user has no ITIL role but has other roles
}
else if(!this.hasRoles) {
return '/sp'; //Route to Portal if no roles
}
}
Note: Modify the script accordingly for the assignment group check along with the ITIL role.
Results :
User(s) with ITIL role
User(s) without ITIL role but other roles
User(s) with no roles
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 06:55 AM
@A_maity002 Please find the details below for routing it to Service Operations Workspace.
1. Navigate to Script Include -> SPEntryPage
2. Edit the "getFirstPageURL" function as below,
var roleCheck = new GlideRecord('sys_user_has_role');
roleCheck.addQuery('user', gs.getUserID());
roleCheck.addQuery('role','!=',gs.getProperty('internal.role'));
roleCheck.query();
if (roleCheck.getRowCount() > 0)
this.hasRoles = true;
if(gs.hasRole('admin')) {
return;
}
else if (gs.hasRole('itil')) {
return '/now/sow/home'; //Route to SOW if user has ITIL role
}
else {
if (!gs.hasRole('itil') && this.hasRoles) {
return 'now/nav/ui/home'; //Route to Homepage if user has no ITIL role but has other roles
}
else if(!this.hasRoles) {
return '/sp'; //Route to Portal if no roles
}
}
Note: Modify the script accordingly for the assignment group check along with the ITIL role.
Results :
User(s) with ITIL role
User(s) without ITIL role but other roles
User(s) with no roles
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 12:15 AM
Hello @Sujatha,
Many thanks for your solution. 🙂
I have implemented the changes in PDI as you have suggested. This is working correctly with some modification as my requirement.
But what my real issue is, I could not find any OOTB solution. The script include you have mentioned also is 'High Priority file', ServiceNow itself suggest us not to modify these files because this may effect next upgrade/patch update where this file may skip.
Could you please suggest me on this ?
Thanks & Regards,
Atanu Maity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 11:16 AM
It’s advised not to alter the OOB configurations.
Customisations are based on the requirement provided by the customers. If really don’t want to edit such files then you may convince the customer to ahead with OOB.
Kindly refer the below links for more information:
As per the above note in ServiceNow docs, please check the last few lines.
https://www.servicenow.com/community/now-platform-articles/washingtondc-new-feature-managing-upgrade...
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 12:32 AM
Hello @Sujatha,
Many thanks for your support and more information about OOTB changes.🙂
Kind Regards,
Atanu Maity