Create a custom attachment button for your service catalog
When you are submitting a service request, you can add attachments using the icon located on the form header. But, if you want to enhance the form with a customized Add Attachment button, there's a simple way to create this to make the functionality that much easier.
You'll just need to create a UI page with some basic scripting. The script will actually include the button and fires when the button is clicked. You'll also need to add a UI page variable to your catalog item to reference the UI page.
How to add a customized attachment button in your service catalog:
First, create the UI page:
- Go to System UI > UI Pages.
- Click New.
- Create a name such as Add_Attachment_UI.
- In the Category field, select General.
- In the HTML field, copy the script from below. Label the button whatever makes sense for your catalog page (see bold text below):
<?xml version="1.0" encoding="utf-8" ?>
Add Attachment
Then, add a UI page variable:
- From your catalog item, add a New Variable.
- In the Type field, select UI Page.
- In Type Specifications, enter Add_Attachment_UI in the UI page field.
- Set the rest of the fields as normal.
You'll now be able to view your button on your catalog item:
And when you click it, your standard attachment browser will automatically display:
Having Service Catalog UI issues? See:
Redirecting the Back to Catalog button
Get the Continue Shopping button working in your Service Catalog
https://www.servicenow.com/community/now-platform-blog/create-a-custom-attachment-button-for-your-service-catalog/ba-p/2291151