How to add "Attachment paperclip" button on top of the catalog item in Kingston version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2019 02:00 AM
How to add "Attachment paperclip" button on top of the catalog item in Kingston version?
Note - I have the attachment clip at the bottom but want at the top as well with same functionality. Can someone help with the steps?
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2019 10:48 AM
You can add a variable of the Type Macro, or Macro with Label, and reference a UI Macro with the below code to replicate the Attachment icon in button format.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<button class="request_catalog_button_with_icon btn cat-btn btn-primary" onclick='attach()'>Attachments</button>
<script language="javascript">
function attach() {
saveCatAttachment(gel('sysparm_item_guid').value, 'sc_cart_item');
}
</script>
<!-- </td></tr></table> -->
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2019 12:35 AM
Hi
i tried the above code and its giving me attachment button but I want to have the attachment paper clip icon how to get that is my concern
Regards
Viraj

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2019 01:28 AM
Try this
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j:set var="jvar_attachment_icon" value="${jvar_icon_path}" />
<g:sc_button id="sc_attachment_button" label="${gs.getMessage('Attachment')}" title="${gs.getMessage('Attachment')}"
classes="header_button icon-paperclip sc_paperclip btn-icon btn cat-btn btn-default"
onclick="attach();" />
<script>
function attach() {
saveCatAttachment(gel('sysparm_item_guid').value, 'sc_cart_item');
}
</script>
<!-- </td></tr></table> -->
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2019 02:50 AM
Hi Vignesh,
The script you have provided is not working over the portal.Can you suggest please?
Regards,
Viraj