How to hide attachment from service portal

Joyal Robert
Tera Contributor

How can we hide attachment inside the service portal. What script need to be added to server side of widget editor to hide attachment?

Please help

18 REPLIES 18

No need to delete only need to hide specific ones

 

Harshit Jamwal1
Mega Guru

https://community.servicenow.com/community?id=community_article&sys_id=c97c728cdb9d53c42328f3231f961...

You may find the link helpful. Please mark the answer correct if it helps.

 

Thanks,

Harshit 

i need to remove attachment file which i uploaded in the form and after submitting i should not see the attachment

function onLoad() {
	
	var attachmentButton = top.document.getElementsByTagName('sp-attachment-button');
	attachmentButton[0].parentNode.hidden = true;
	
}

I have test the code my instance it works. Please mark the answer correct if this helps.

Hi, It worked for me. Thank you