How to hide "Manage Attachments" link and the attachments on the incident form

Hari1
Mega Sage

Hi,

Is it possible to hide the "Manage Attachments" link and the attachments based on users/ groups on the incident form.

find_real_file.png

Regards,

Hemanth

1 ACCEPTED SOLUTION

Hi Hemanth,

The manage attachments is to be shown or hidden to particular assignment group on incident form or always it should check if logged in user is member of particular group

Do ensure you add your logic but below is how you can do using DOM

Note: It is not recommended to use DOM

Ensure You use below

1) Isolate Script field to false

2) This field is not on form but from list you can make it false

find_real_file.png

Sample script below

1) To hide entire row of Manage Attachments and the attachments

function onLoad(){

document.getElementById('header_attachment').style.display = 'none';

}

find_real_file.png

2) To hide only the Manager Attachments link use this

function onLoad(){

document.getElementById('header_attachment_list_label').style.display = 'none';

}

find_real_file.png

Regards
Ankur

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

View solution in original post

14 REPLIES 14

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Hemanth,

You can show/hide the attachment using ACL on sys_attachment

Please explain your exact use case

Regards
Ankur

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

Hi Ankur,

I need the "Manage Attachments" and the attachments to be disabled/hidden once the state value on the incident form changes to "Testing in Progress". 

Thanks.

Hi Hemanth,

you would require DOM manipulation for this and it is not recommended

If you still require to do this let me know & I can help

Regards
Ankur

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

Hi Ankur,

Can we give it a try? Can you let me know how to achieve this?

Regards,

Hemanth