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.

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

Hi @NBeheydt  You can write CSS on ticket page to hide attachment icon from "Activity" tab. 

 

You can use below CSS. 

 

.va54beb3a87f10010e0ef0cf888cb0bba .panel-title-icons ul {
    display: none;
   }

 

Steps: 

  1. CTRL + Right click on ticket page then you will see option "Instance In Page Editor" .
  2. Click on "Instance In Page Editor", it will open a page there you will see "CSS" field, add css which i have added here.
  3. Save the page and reload the ticket page. You will not see attachment icon.

 

Attached screenshot for your reference. I have tested and its working on my PDI

 

page editor.PNG

 

add CSS.PNG

 

Result: 

 

result ticket.PNG

 

Hope it will help you.

 

Thanks,

Harsh

View solution in original post

6 REPLIES 6

Sid_Takali
Kilo Patron
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
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