- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 02:04 AM
Hi,
I have created a module under service catalog -> open records. Want to display the module only to a group. Please suggest how to achieve it
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 02:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 02:10 AM
Hi Deepa,
Have done the same kind of requirement for one of any customer in the below mentioned way. .
1.Write a before query business rule on Module(sys_app_module) table .
2.In condition check if the login user is part of that group.
3.In the script condition write :
(function executeRule(current, previous /*null when async*/) {
current.addQuery('sys_id', '!=', 'SYS_ID OF MODULE/SUB-MODULE YOU WANT TO HIDE');
})(current, previous);
This will hide that particular module/sub-module from the person having membership of that group . I hope this helps .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 01:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 02:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 02:21 AM
Hi Sneha,
Thanks for you quick response. I tried it, but it is not working for me.
Here is my script. Please correct me if am wrong.
executeRule();
function executeRule(){
if(!gs.getUser().isMemberOf('Hardware'))
{
current.addQuery('sys_id','!=','bea2f162db1103002bdc7b1ebf9619be');//sys_id of the application
}
}