- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 06:53 PM
I was able to control attachment uploads by making the record field read-only and hiding the clipboard icon!
However, files that have already been attached are still available for download.
Is it possible to disable the download link for attachments only for users who meet certain conditions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 07:11 PM
Hi @bonsai ,
you can create an onload client script with isolate script = false
add your logic to check if the user is meeting the criteria to below script and hide them accordingly
function onLoad() {
//Type appropriate comment here, and begin script below
hide('header_add_attachment'); //hides paper clip icon
hide('header_attachment'); // hides attachment bar
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 07:55 PM
you can hide the complete attachment header if the user doesn't satisfy certain condition
this worked for me in onLoad client script.
Ensure your onLoad client script has Isolate Script= False to allow DOM manipulation
Note: DOM manipulation is not recommended
document.getElementById('header_attachment').style.display = 'none';
document.getElementById('header_attachment_line').style.display = 'none';
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
04-09-2025 07:11 PM
Hi @bonsai ,
you can create an onload client script with isolate script = false
add your logic to check if the user is meeting the criteria to below script and hide them accordingly
function onLoad() {
//Type appropriate comment here, and begin script below
hide('header_add_attachment'); //hides paper clip icon
hide('header_attachment'); // hides attachment bar
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 07:55 PM
you can hide the complete attachment header if the user doesn't satisfy certain condition
this worked for me in onLoad client script.
Ensure your onLoad client script has Isolate Script= False to allow DOM manipulation
Note: DOM manipulation is not recommended
document.getElementById('header_attachment').style.display = 'none';
document.getElementById('header_attachment_line').style.display = 'none';
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