Prevent rename attachment file in the SOW

Heroes91
Tera Contributor

Hello everyone! 

Does someone know how to prevent/restrict the renaming of any attachment file in the Service Operation Workspace?

Heroes91_0-1751063649794.png

That Rename Action/Link should only be visible to admin users. So! Even if an itil user uploads a file, he should not be able to rename it afterwards. Only admin must have the possibility to rename an attachment. Does someone have any idea how I could achieve this?

What I have done so far but without success. 

I have found out about this ACL sys_attachment.file_name with the following sys_id 7eb46337870133006d3c1f0497cb0b94. Even though I modified to only work for admin users, non-admin users were still capable of seeing the rename Action/Link and rename the attachment. 

Furthermore, I found out through the knowledge article KB0758956, that there is an UI - Macro called attachment_entry with the following sys_id 2c43bf710a0a0b39001e825b1ea82b4f. In the Article, it is said that it should be possible to achieve my goal when adjusting the macro. But it did not work. 

May someone already did something similarly? I will be pleased to any help. 

 

Kind regards

Heroes 



 

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Heroes91 

ui macro won't work in UI builder.

you will have to check the UI builder component for attachment

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

Hi @Ankur Bawiskar

thx for pointing that out. I already checked it. Do you have any idea if there is an ACL responsible to that Rename Action/Link? Because I was able for instance to hide the Delete Action/Link to be visible only for admin trough an ACL. 

Regards,

Heroes

@Heroes91 

you can try to use before update business rule and see if file_name field is getting changed for that table

If yes then stop the update using current.setAbortAction(true)

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

GlideFather
Tera Patron

Hi @Heroes91,

I only found this UI Macro attachment_entry but it is strongly recommended not to modify this.

Why do not you want to give people the chance to rename their attachment? Sometimes I take a few screenshots, attach them to an incident form and then because they are all named according to the time when they were captured - e.g. "Screenshot 2025-06-28 at 07.53.31", "Screenshot 2025-06-28 at 05.32.11", ... it is difficult to operate with them, so I am glad to have the chance to rename them to "Backend - issue" or "List of records" to give the picture some better context.

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */