- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 03:44 AM
Hello All,
I am creating Read ACL on the RITM table , i have included ITIL role in role condition and Assignment group is dynamic one of my groups or Assigned to is dynamic me in Data Condition(This restriction is working as expected). Along with this i want to also include catalog task assignment groups members to be able to see RITM's . How to include this in ACL script .
Note: I don't want to use query Business Rule.
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 04:50 AM
@zeeshan ahmed I've created new Read ACL on sc_req_item table with the below script and it's working as expected.
answer = false;
var groups = [];
var tasks = new GlideRecord('sc_task');
tasks.addEncodedQuery('request_item='+current.sys_id);
tasks.query();
while (tasks.next()) {
if (!gs.nil(tasks.assignment_group)) {
groups.push(tasks.getDisplayValue('assignment_group'));
}
}
for (var i = 0; i < groups.length; i++) {
if (gs.getUser().isMemberOf(groups[i])) {
answer = true;
break;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 04:43 AM
hi @Ankur Bawiskar ,
i tried all the above provided solution , still does not work for me .please find the attached screenshot . Along with these conditions i want Catalog task assignment group members should see RITM's of those catalog tasks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 04:47 AM
there are many conditions, please share the script you tried and what debugging did you do?
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
05-12-2025 04:50 AM
@zeeshan ahmed I've created new Read ACL on sc_req_item table with the below script and it's working as expected.
answer = false;
var groups = [];
var tasks = new GlideRecord('sc_task');
tasks.addEncodedQuery('request_item='+current.sys_id);
tasks.query();
while (tasks.next()) {
if (!gs.nil(tasks.assignment_group)) {
groups.push(tasks.getDisplayValue('assignment_group'));
}
}
for (var i = 0; i < groups.length; i++) {
if (gs.getUser().isMemberOf(groups[i])) {
answer = true;
break;
}
}