
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 02:22 AM - edited 02-20-2025 02:25 AM
We require the "Desktop support" group to have access to RITMs belonging to catalog items of a specific category. We are trying to achieve this with ACL, but it hides all RITMs.
Restrict access to RITM tickets and "Tasks included"
- Users in the group
- The user who created the ticket
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 05:12 AM
@Community Alums
so if logged in user belongs to Desktop support then show RITM belonging to particular catalog item
If not then show all
Before query business rule on sc_req_item table
Condition:
gs.getUser().isMemberOf('Desktop Support') && gs.getSession().isInteractive()
Script:
(function executeRule(current, previous /*null when async*/ ) {
// Get the current user's ID
var userId = gs.getUserID();
// Restrict access to RITMs belonging to catalog items of a specific category
current.addQuery('cat_item.category', 'YOUR_CATEGORY_SYS_ID').addOrCondition('opened_by', userId); // Replace with your category sys_id
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-25-2025 02:09 AM
Above answer worked with below changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 03:42 AM
Hi @Community Alums
You can use before Query Business Rule to achieve this. add when to run qualification as per requirement.
You can use script something like below to achieve this.
current.addQuery('opened_by',gs.getUserID()).addOrCondition('assignment_group','8a5055c9c61122780043563ef53438e3');
You can add record in sys_properties form of the group record as per best practices.
Regards,
Sourabh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 05:12 AM
@Community Alums
so if logged in user belongs to Desktop support then show RITM belonging to particular catalog item
If not then show all
Before query business rule on sc_req_item table
Condition:
gs.getUser().isMemberOf('Desktop Support') && gs.getSession().isInteractive()
Script:
(function executeRule(current, previous /*null when async*/ ) {
// Get the current user's ID
var userId = gs.getUserID();
// Restrict access to RITMs belonging to catalog items of a specific category
current.addQuery('cat_item.category', 'YOUR_CATEGORY_SYS_ID').addOrCondition('opened_by', userId); // Replace with your category sys_id
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-23-2025 04:18 AM
@Community Alums
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-25-2025 02:09 AM
Above answer worked with below changes