Different homepage in service portal based on User Role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 06:10 AM
Can anyone help me how to have different homepages in a single portal based on user roles?
When the user login service portal, based on the user role the homepage should vary.
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 06:19 AM
You can write a before Query Business rule on the table- sp_page with different homepages as Homepage1,Homepage2 etc.
(function executeRule(current, previous /*null when async*/) {
if (gs.getUser().hasRole('admin')) {
var qc = current.addQuery('id=Homepage1');
}
if (gs.getUser().hasRole('itil')) {
var qc1 = current.addQuery('id=HomePage2');
}
if (gs.getUser().hasRole('cmdb_admin')) {
var qc2 = current.addQuery('id=Homepage3');
}
if (gs.getUser().hasRole('asset_admin')) {
var qc3 = current.addQuery('id=Homepage4');
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 06:41 AM
This didn't work Manoj. Do you have some other options?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 06:21 AM
Hi Sobitha,
try to use Login Rules.
http://wiki.servicenow.com/index.php?title=Legacy:Configuring_the_Login#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 06:23 AM
You could create a new page and select that as homepage. In new homepage check for the user roles and redirect accordingly.