Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to hide 'edit' on standard ticket tab Attachment tab

Mike Stockman1
Tera Guru

Im using Standard Ticket on my csp portal and want to modify the standard ticket tab - attachments so that there is not the edit icon. I'm trying to make it where someone cannot change the name of the attachment. 

Where do i go to remove that edit button?

1 ACCEPTED SOLUTION

sanjeet1245
Tera Guru

Hi @Mike Stockman1 
please use below script . create a onload client script on the table you want to remove a edit button 

 

function onLoad() {
   
        var editButton = top.document.querySelector('button[aria-label="Edit Attachments mode"]');
        if (editButton) {
            editButton.style.display = 'none';
        }
}

View solution in original post

5 REPLIES 5

Slava Savitsky
Giga Sage

Whether than button is visible depends on the user's permissions that are determined by "write" ACLs for the Attachment [sys_attachment] table.

ACLs didnt work.

We used CSS to turn off those icons.

 

Have you contacted ServiceNow's technical support? If that icon doesn't honor ACLs, it is a defect that ServiceNow need to fix.

sanjeet1245
Tera Guru

Hi @Mike Stockman1 
please use below script . create a onload client script on the table you want to remove a edit button 

 

function onLoad() {
   
        var editButton = top.document.querySelector('button[aria-label="Edit Attachments mode"]');
        if (editButton) {
            editButton.style.display = 'none';
        }
}