Need to hide attachment clip icon on RITM page in service portal

valuroutu
Tera Contributor

Team,

I got a requirement to hide the attachment clip icon on the RITM page of a particular catalog item on service portal. For this I had cloned the widget 'Ticket Attachment' and customized it in order to hide the attachment clip on the RITM page for the catalog item 'Samsung Galaxy S7 Edge' in my personal developer instance.

I couldn't replicate the same functionality in my project instance due to our recent implementations which are hiding the option 'Page in designer' when ctrl + left clicked.

How do I achieve the same functionality? Any leads would be helpful!

Thanks!

Krishna

3 REPLIES 3

rahulpandey
Kilo Sage

Hi,

Put this code in form widget server side code at bottom.

 

data.showAttachmentIcon = true;
if(data.table == "sc_req_item" && data.f._fields.cat_item = 'here goes your sys_id' ); // I would probably use properties instead of hard coded
data.showAttachmentIcon = false;

 

In HTML change below line 

<div ng-if="attachmentHandler && data.canAttach" title="{{::data.addAttachmentMsg}}" class="pull-right attachment-button">
      	<sp-attachment-button></sp-attachment-button>
      </div>

 

to 

<div ng-if="attachmentHandler && data.canAttach && data.showAttachmentIcon" title="{{::data.addAttachmentMsg}}" class="pull-right attachment-button">
      	<sp-attachment-button></sp-attachment-button>
      </div>

 

Hope this will help

 

Hi!

 

This does not fix it for me. Can you suggest what I might be doing wrong?

I don't find the HTML part in attachment widget.

Regards

Richa

Jay Gamblin
Mega Sage

BTW if your looking to hide the attachment icon on the top of the Ticket Conversations widget for a particular instance of it, there is an option you can specify directly in the instance record Additional options field

{
	"hideAttachmentBtn": {
		"value": "true",
		"displayValue": "true"
	}
}

From the widget pick Open in platform and edit this directly.