We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Restrict visibility of attachment on SCTASK and RITM activity

RaginiP
Tera Contributor

Hello,

 

ON RITM and sc_task, only members from a particular group should be able to access attachments attached in Catalog Item Variables from the activity section. How to achieve this

 

Any Insights into this are highly appreciated. 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@RaginiP 

you want to hide attachments from activity log based on group membership?

If yes then it can't be done without DOM manipulation

If you still wish to use DOM then check this link where I shared solution for something similar and enhance it by checking group membership and attachment

Note: DOM manipulation is not recommended

Hide Image Activities from RITM 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron

@RaginiP 

you want to hide attachments from activity log based on group membership?

If yes then it can't be done without DOM manipulation

If you still wish to use DOM then check this link where I shared solution for something similar and enhance it by checking group membership and attachment

Note: DOM manipulation is not recommended

Hide Image Activities from RITM 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

ThanksAnkur,
Is there an alternative approach available for this

@RaginiP 

nope.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

norman89till
Kilo Contributor

To restrict access to attachments within Catalog Item Variables on sc_req_item and sc_task, you should implement a Read ACL on the sys_attachment table. Since variables are stored differently than standard record attachments, you must script the ACL to check the Table name (which will be ZZ_YYsc_req_item or sc_item_option) and use gs.getUser().isMemberOf('Your Group Name') to validate the user’s membership. Additionally, ensure you disable the "List" attribute on the variable itself if you want to prevent the filenames from appearing in the activity stream for unauthorized users.