Hide attachment icon in Service Portal activity tab

NBeheydt
Tera Expert

Is there a way to hide the paperclip icon on the Service Portal in the Activity tab when posting comments?  We already have the 'Hide Attachments' option checked on the record producer.

Sid_Takali
Kilo Patron

Hi @NBeheydt try this

1. Go to the catalog item 
2. Under "Catalog Client script" Related list, click new
3. Give a name and select the type as "onLoad" and UI Type as your requirement
4. Paste the following code
function onLoad() {
//Type appropriate comment here, and begin script below
document.getElementById("sc_attachment_button").hide();


}
5. save the record

 

Please mark my answer Correct/Helpful

Regards,

Siddharam

Mohith Devatte
Tera Sage

@NBeheydt  Can you please tell me to which page it is redirecting you ?

you can see the page iD in the URL  

 

id=ticket

@NBeheydt in that case it is a OOB page.

You can navigate to pages -->search with "ticket" in ID field --> open the record and scroll down and you can see there is a widget called ticket conversation.(SEE BELOW IMAGE)

 

Screenshot 2024-02-08 at 12.10.10 AM.png

 

Once you open the widget in  widget editor , go to HTML and see line no 23 where they have used a angular directive called <sp-attachment-button> which is rendering the attachment button .

Screenshot 2024-02-08 at 12.13.45 AM.png

 

 

You can remove this but you might have to clone your ticket page and then clone the ticket conversation widget which will allow you to remove line no 23 and then finally you need to redirect all your users to your new cloned ticket page so that changes you made are applied.

 

Hope this helps 

Mark the answer correct if this helped you

Thanks