When submitting a Service Request, the requester can add attachments using the icon located on the form header. That icon is not always very noticeable. Customers sometimes ask for an [Add Attachment] button to be placed within the Service Catalog to make adding attachments easier for the requester.
Create a UI page using the following steps:
- Navigate to System UI > UI Page.
- Click New.
- Provide a Name such as Add_Attachment_UI.
- In Category, select General.
- In the HTML section, copy the paste the following HTML (note that you can change the label of the button by changing the highlighted section):
<?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 type="button" onclick="saveCatAttachment(gel('sysparm_item_guid').value, 'sc_cart_item')">Add Attachment</button>
- From your Catalog Item, add a New Variable.
- In Type, select UI Page.
- In UI Page, select Add_Attachment_UI (from the process above).
- Set the rest of the fields as you normally would.
The following button appears below on your Catalog Item:
When you click the button, the standard Attachment Browser is displayed:
The rest of the features are standard, base system functionality.