- 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-26-2019 10:15 PM
Hi Cameron,
can you share the screenshot of the form where this is happening and also the script?
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
â07-26-2019 11:08 PM
Try using Before query business rule to restrict records for specific users based on conditions , i think it will best suite for your case.
check below link for more details:
https://www.servicenowguru.com/scripting/business-rules-scripting/controlling-record-access-before-query-business-rules/
Check below BR for example:
search "incident query" in your instance!!
-satheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-27-2019 10:13 AM
As the requirement is for limiting access to the RITM records (and the related SCTASK records) created from a specific catalog item, creating an ACL rule will be the best way to achieve this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â07-27-2019 10:19 AM
You can hide that particular related list using an onLoad script. Below link should help.
https://developer.servicenow.com/app.do#!/api_doc?v=kingston&id=r_GlideFormHideRelatedList_String
Please mark this response as correct or helpful if it assisted you with your question.