- 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-15-2021 01:41 AM
Hi Ankur,
when I impersonate that specific role user, filter navigation is not visible to check modules or visible or not..
how to check..
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2021 05:51 AM
Hope you are doing good.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Thanks!
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
‎11-08-2021 09:52 AM
The application sys_id that you have in this example is the same as Ankur gave in his example. Find the correct sys_id and this should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2025 12:19 AM
Hi Ankur
It is hiding whole application navigator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2025 12:24 AM
Can you raise a new question and share your business requirement, what you tried and what's the expected outcome? tag me there
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader