- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-26-2019 02:37 PM
We have a service catalog item ABC, that generates RITM/SCTASK as any other OOB SC item would do.
Is there a way to hide RITM/SCTASK lists created as a result of submitting a request via cat item ABC. In other words we would like to restrict a group of users to be able to see RITM and SCTASK created under catalog item ABC.
I have tried hiding variables with a role with an onload script which works but the small preview i icon still shows them as well as users can still see RITM list.
Any help would be greatly appreciated.
Thanks,
Cam
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-29-2019 09:22 AM
I got it working. Just had the && condition needed instead of ||
(function executeRule(current, previous /*null when async*/) {
if(gs.getUserID().hasRole('admin')!=true && gs.getUserID().hasRole('epic1')!=true) {
current.addQuery('cat_item.name','!=','Apple iPad 3');
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-29-2019 04:06 AM
Thanks weikiat.g. I have BR on query action still didn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-29-2019 09:22 AM
I got it working. Just had the && condition needed instead of ||
(function executeRule(current, previous /*null when async*/) {
if(gs.getUserID().hasRole('admin')!=true && gs.getUserID().hasRole('epic1')!=true) {
current.addQuery('cat_item.name','!=','Apple iPad 3');
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-29-2019 06:15 PM