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

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

Hi Ankur,

Can you please help me in achieving this using ACL if possible

Usecase: To hide the manage attachments on the incident form when currently logged in user is part of selected assignment group

Thanks in advance!

Regards,

Swathi

This seems to solve my problem but I want this to work on my view. I have restricted view created and if this view is on I want both attachment and manage should not be seen. How to write it for view?

@Hemanth 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

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

Hi Ankur, 

It is working as expected. Thanks.

Regards,

Hemanth