The CreatorCon Call for Content is officially open! Get started here.

Service Portal - Custom Attachment Button on Service Catalog

Joey Wan Kenobi
Tera Guru

Does anyone know how to add make a custom attachment button widget work on the service portal for the service catalog?

In Helsinki, this worked fine:

<a href="javascript:void(0)" class="panel-button sp-attachment-add" onclick="jQuery('#attachment_add').click();">

  <span class="glyphicon glyphicon-paperclip"></span>

</a>

In Jakarta patch 6, the button no longer responds (it does nothing). Can anyone help?

1 ACCEPTED SOLUTION

nathanfirth
Tera Guru

Check out the widget I've posted on ServicePortal.io, there I have an example of a custom widget that triggers the attachment.



https://serviceportal.io/downloads/require-attachments/


View solution in original post

20 REPLIES 20

This may help: Require Attachments - ServicePortal.io


May require some minor tweaks though.


I've tried <sp-attachment-button> but it does nothing too


does something need to be injected to use <sp-attachment-handler>


nathanfirth
Tera Guru

Check out the widget I've posted on ServicePortal.io, there I have an example of a custom widget that triggers the attachment.



https://serviceportal.io/downloads/require-attachments/


So all of that is necessary in a widget now?



Talk about backwards progress...



Any insight on <sn-attachment-button> and what it does?