- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2025 10:52 PM
I have a requirement to have attachment visible only for requestor and 2 groups for particular record producer.
RP will create case with particular subcategory, requirement is when subcategory=9, then any attachment should be visible only to requestor and 2 groups and can be added/removed only by these. How to achieve it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2025 11:24 PM
you can use table.None READ ACL on sys_attachment with advanced script
Condition: current.table_name == 'targetTableName'
Advanced script:
var gr = new GlideRecord("targetTable");
gr.addQuery("sys_id", current.table_sys_id);
gr.addQuery("subcategory", "9");
gr.query();
answer = gr.hasNext() && (gs.getUser().isMemberOf('Group A') || gs.getUser().isMemberOf('Group B'));
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
‎06-23-2025 11:03 PM
Hello @Hafsa1 ,
Create the read ACL on sys_attachment table and add your conditions , below is the sample example
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2025 11:24 PM
you can use table.None READ ACL on sys_attachment with advanced script
Condition: current.table_name == 'targetTableName'
Advanced script:
var gr = new GlideRecord("targetTable");
gr.addQuery("sys_id", current.table_sys_id);
gr.addQuery("subcategory", "9");
gr.query();
answer = gr.hasNext() && (gs.getUser().isMemberOf('Group A') || gs.getUser().isMemberOf('Group B'));
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
‎06-23-2025 11:34 PM
@Ankur Bawiskar Thanks, I was struggling with BR but seems ACL is best option