- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2021 01:15 AM
Hi all,
I want to hide some modules under Self Service application in filter navigation based on role.
Here in filter navigation I want to hide above modules under self service application for specific role.
For other users(except specific role) I want visible these modules.
How to achieve this..
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2021 01:31 AM
You can control which module can be shown to which role
But not the other way round
So you can create query business rule on sys_app_module table that would only run for these role users and restrict those 3 modules and show all others
Condition:
!gs.hasRole('admin') && gs.getSession().isInteractive() && gs.hasRole('roleName')
Script:
(function executeRule(current, previous /*null when async*/) {
current.addEncodedQuery('application=08771d0cc0a8016401f604303b94b999'); // give the sys_id of the application menu here
current.addQuery('title', '!=','Business Applications');
current.addQuery('title', '!=', 'Field Service Catalog');
current.addQuery('title', '!=', 'Knowledge');
})(current, previous);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2021 01:22 AM
Hi Srujuna,
You can Traverse to that specific module ----> click on Edit Application
And in Visibility tab select the roles to whom it should get displayed.
Please let me know if this works!
Please mark the answer correct if it helps!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2021 02:05 AM
Hi,
I am having lot of roles to visible that module..
where should i mention that specific role to restrict the module.
Thanks..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2021 01:26 AM
Hi @srujana
- click on pen icon
in new page update the roles
:
Thanks,
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2021 01:31 AM
You can control which module can be shown to which role
But not the other way round
So you can create query business rule on sys_app_module table that would only run for these role users and restrict those 3 modules and show all others
Condition:
!gs.hasRole('admin') && gs.getSession().isInteractive() && gs.hasRole('roleName')
Script:
(function executeRule(current, previous /*null when async*/) {
current.addEncodedQuery('application=08771d0cc0a8016401f604303b94b999'); // give the sys_id of the application menu here
current.addQuery('title', '!=','Business Applications');
current.addQuery('title', '!=', 'Field Service Catalog');
current.addQuery('title', '!=', 'Knowledge');
})(current, previous);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader