
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 10:05 PM
Hi,
We have a requirement to Hide an Application if a user is part of group "Test Group". I have written a Before Query Business rule to achieve the same, however the same seems to be not working.
I am on Kingston version.
My BR is :
When: Before Query
Script:
function onBefore(current, previous) {
if(gs.hasRole("itil") && (gs.getUser().isMemberOf('Test Group')))
{
current.addQuery('sys_id','!=','deecb70ec611228700bafda6dde05102');//sys_id of the application
}
}
Any advice on what is the issue here or if there is an alternate solution to the same?
Your help is appreciated in advance.
Thank You
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 10:32 PM
Hello,
I don't think before query BR would work on the application navigation as it is not a list view. This works only on list views.
You will need to create a new role and add it on the application menu or required modules and the user should not be tagged with that role if you want to hide it.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 10:09 PM
Hi,
What i will suggest is to create a dummy role and assign it to that group. This should be a easy way and more accurate to achieve this.
Then in application navigation you can add that role in role field.
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 10:13 PM
Hi Ashutosh,
Thanks for your reply.
I am trying to hide an application here. So if I create a custom role "ABC" and add that role under my application, then any user with that role ABC will be able to see it.
My requirement here is to hide the application if user has the role ABC/ part of a group XYZ.
Any advice?
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 10:25 PM
Hi,
Oh my bad! I misunderstood it.
Then your before Query BR should work like this:
function onBefore(current, previous) {
if(gs.hasRole("itil") && (gs.getUser().isMemberOf('SYS ID OF GROUP SHOULD BE HERE')))
{
current.addQuery('sys_id','!=','deecb70ec611228700bafda6dde05102');//sys_id of the application
}
}
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2019 12:14 AM
Hi,
This did not work as well. Not sure what's happening!
Any advice?
Thanks