- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2025 05:23 AM
I have an ACL on sc_req_item table as below to allow read access to the RITM for sc task approvers.
How to remove GlideRecord usage in ACL and replace with ACL conditions so that it still grants read access to the RITM and variables on it for sc task approvers
var app_obj = new GlideRecord('sysapproval_approver');
app_obj.addQuery('approver', gs.getUserID());
app_obj.addQuery('sysapproval', current.sys_id);
app_obj.query();
if (app_obj.next()) {
return true;
}
return false;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2025 05:30 AM
not possible directly using condition as RITM table doesn't hold approver info
You can move code to Script include and call that in ACL script and you should be good.
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
10-08-2025 06:45 AM
I did but the ask is not to move to script include and only way left is to do with ACL conditions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2025 07:07 AM
then not possible directly.
Use this approach
1) create custom field of type List referring to sys_user
2) store the approvers of that RITM in it
3) then use this in ACL condition
💡 If my response helped, please mark it as correct ✔️ and close the thread 🔒 — this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2025 07:43 PM
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✔️ and close the thread 🔒 — this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2025 06:41 AM - edited 10-08-2025 06:44 AM
@Snehal13 what is datatype of ?
current.request.approvers
you can verify with below code.
(function() {
answer = false;
// Ensure we have a parent request and an approvers list
if (current.request && current.request.approvers) {
var approvers = current.request.approvers + ''; // force to string
if (approvers.split(',').indexOf(gs.getUserID()) > -1) {
answer = true;
}
}
})();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2025 06:45 AM
tried but didnt work
