How to Remove Attachment icon on Record Producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2017 01:52 PM
if i am using " g_form.disableAttachments" I am getting this error : in portal it was saying : g_form) [DEPRECATED] Method disableAttachments is deprecated and unsupported on mobile
can any one suggest me what is the best way to do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2017 12:08 PM
I have tried :
var attachment_header = document.getElementById('sc_attachment_button');
attachment_header.style.display='none';
or
var ma = gel('header_attachment_list_label');
ma.style.display = 'none';
but no luck since in portal we have :
<sp-attachment-button></sp-attachment-button><span style="padding-left:4px;">${Add attachments}</span>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2017 08:09 AM
Hi there,
I was having the same issue when trying to hide the attachment button and icon on a Record Producer on the Service Portal. Finally found something that is working for me:
function onLoad() {
var attachmentButton = top.document.getElementsByTagName("sp-attachment-button");
//console.log(attachmentButton);
attachmentButton[0].parentNode.hidden = true;
}
Regards,
Eli de Lima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2017 12:00 PM
This worked for me however, the attachment icon is still available within the Service Catalog. Just thought I would throw that out there. Thanks, again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2023 11:00 AM
No need for a script to remove the icon from the attachments in a record producer (San Diego Version).
Go to Maintain Item > Show Hide Attachment column in list > Set to true for your record producer