Restrict the deletion of attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi ,
I have a requirement to restrict deletion of attachment post submission of request for particular catalog item.
I followed this -https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0825743
It works well, but on portal even though attachment is not deleted it adds an additional comment saying deleted attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
can you try Creating Fresh Table.None DELETE ACL on sys_attachment?
if user fails ACL then delete/cross icon won't be shown
Ensure none of the existing DELETE ACLs pass for sc_req_item
-> add this in condition of existing Table.None DELETE ACLs, so that they don't allow DELETE
-> in the new ACL you create, use this script
var gr = new GlideRecord("sc_req_item");
gr.addQuery("cat_item.name", "XYZ");
gr.addQuery('sys_id', current.table_sys_id);
gr.query();
answer = !gr.hasNext();
💡 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
3 weeks ago
Hi @Ankur Bawiskar
I did implement the same solution and added the condition on existing delete acl on attachment table but it doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
try checking that widget and how it shows that cross icon
that will help you to restrict
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
