How can I hide the “Edit file nam” button for attached files in CSM?e
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
While working with the out-of-the-box [sc_cat_item] in CSM, I noticed that the “Edit File Name” button (pencil icon) appeared when I attached a file.
I was able to hide this button using a stylesheet, but is it possible to clone the widget itself, edit the relevant section, and configure it so that the button doesn’t appear in the first place?
I suspect it’s likely `csm_sc_cat_item`, but I think I’ll need to clone not only that but also the page or widget it’s referenced in to edit it.
I’m having trouble identifying that specific page.
Thank you for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
31m ago - last edited 7m ago
Hi @html5lv2stu
Please use the script below by creating an OnLoad Client Script on the relevant table where you want to hide the Edit button.
⚠️ Note: This approach relies on DOM manipulation, which is generally not recommended as it may be impacted by platform updates or UI changes.
If this response was helpful, please consider marking it as Helpful or Correct so others in the community can benefit.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
19m ago
you will have to use DOM manipulation for this which is not recommended.
Please inform your customer about this
💡 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 || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
