HR Roles and Service Portal Properties
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2017 01:42 PM
Hi SN Community,
I am developing with the new, scoped HR Service Management. The system property glide.entry.first.page.script is set to new SPEntryPage().getFirstPageURL(), as we would like non-roled users to be taken to the Service Portal upon login. However, in order to allow users access to the HR Portal (/hrportal), they require an HR role, such as sn_hr_sp.hrsp_employee. Now, a user granted only this role is no longer redirected to SP upon login, as coded in the script include, SPEntryPage. Lines here:
Is there a way to restore this functionality, after granting users the SP role? Ideally, I would prefer not to modify the script include, as I don't fully understand in what instances it is run. I'm wondering if SN has taken into account that requiring HR roles impacts this, and has built/will build a solution or property that will allow.
To summarize the solution I am looking for:
- Users with no roles should be directed to the Service Portal on login
- Users with only the sn_hr_sp.hrsp_employee role (and therefore sn_hr_core.hrsm_employee role) are also directed to the Service Portal on login. They will be able to navigate to the HR Portal as well, and if they choose to navigate to customerinstance.service-now.com/hrportal, they will land at the HR Portal.
- Users with any other role, such as itil, admin, etc. are landed at the homepage splash upon login, and can between the 3 portals as their duties require.
- Labels:
-
HR Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2017 12:29 PM
Monica,
Using your summary thought I might take a stab...
- Users with no roles should be directed to the Service Portal on login
The baseline configuration should be performing this action, as here we are looking for "roles," so if the person does not have one they should get redirected.
if (user.hasRoles() && !redirectURL && !isServicePortalURL)
return;
- Users with only the sn_hr_sp.hrsp_employee role (and therefore sn_hr_core.hrsm_employee role) are also directed to the Service Portal on login. They will be able to navigate to the HR Portal as well, and if they choose to navigate to customerinstance.service-now.com/hrportal, they will land at the HR Portal.
Not sure you would be able to get around not using the script include but one thing you might be able to do with it is the following:
if (user.hasRole('sn_hr_sp.hrsp_employee' || 'sn_hr_core.hrsm_employee')){
return this.portal = "/sp/";
}else if (user.hasRoles() && !redirectURL && !isServicePortalURL){
return;
}
Start by checking for the HR specific role, and if they have them, direct them to the Service Portal.
- Users with any other role, such as itil, admin, etc. are landed at the homepage splash upon login, and can between the 3 portals as their duties require.
The "else if" portion above will still check for "roles" and direct them where they can navigate as you mention.
Good luck and let me us know if that helps.
~ Dan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2017 01:31 PM
Hi Dan/Monica,
I have the same issue with an implementation here in new Zealand!
We need access to the HR portal for all the employees - but we still want them redirected to the /sp portal even if they have the employee role stipulated above.
Did you find a solution for this?
Appreciate any help you can provide.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2017 01:31 PM
Hi Dan/Monica,
I have the same issue with an implementation here in new Zealand!
We need access to the HR portal for all the employees - but we still want them redirected to the /sp portal even if they have the employee role stipulated above.
Did you find a solution for this?
Appreciate any help you can provide.