- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 12:33 PM
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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 12:57 PM
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/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 01:15 PM
I implemented it like that so it could be used only when needed on some record producers without modifying the OOB widget.
sn-attachment-button is an Angular directive that displays the attachment button and includes the controller logic need to facilitate the upload.
Since Service Portal is built as a single-page app with Angular.js, it also adds considerable complexity to things like file uploads for security reasons, since now it's all client side.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 01:28 PM
I wonder why sn-attachment-button was non-responsive then.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 01:06 PM
Nathan,
I was able to use your code and it works.
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2018 06:48 AM
Any chance this will work in an order guide? This would solve a ton of problems for a bunch of people who want to attach docs to order guides in the portal. I've tried to attach it inside a record producer that was part of an order guide and no go 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2018 02:43 PM
Thanks Nathanfirth 🙂 Its working fine