Restrict visibility of attachment on SCTASK and RITM activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
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! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 2 hours ago
Hi @RaginiP,
You can achieve this by using the onload() client script; you can use the below code:
function onLoad() {
//Type appropriate comment here, and begin script below
var group;
var assi_gr = g_form.getValue('assignment_group');
if (assi_gr == 'hardware') {
g_form.enableAttachments(true);
}
else{
g_form.enableAttachments(false);
}
}
If you find my answer useful, please mark it as Helpful and Correct 😊
Regards,
Soham Tipnis
ServiceNow Developer || Technical Consultant
LinkedIn: www.linkedin.com/in/sohamtipnis10
