how we upload attachment in catalog item by default when user order

Kishor Mudhili
Giga Guru

hello Guys,

 

i want to add attachment in catalog item by default,

before user submit the request he should download the attachment and order.

 

note: the attachment should not contain link ( should not redirect to any url, once it's click it should download the file )

how we can able to do it. 

5 REPLIES 5

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

I am not really sure if I got your requirement but Please check the answer form Brain in the below post:-

 

https://www.servicenow.com/community/developer-forum/attach-a-file-in-catalog-item-as-attachment/m-p...

 

Please mark my answer as correct based on Impact.

Kishor Mudhili
Giga Guru

guys,

 

how we can get below highlited field in the form. by default it's available in the form

 

KishorMudhili_0-1671623971448.png

 

Hello Kishor,

 

Let me know if I'm understanding you right.

You want to give your users the ability to download a file PRESENT ANYWHERE (Description or between fields ) on the catalog form.

The user can submit the item BEFORE OR AFTER downloading the file.

You want the file to download WITHOUT OPENING A LINK IN A NEW TAB (not sure if this possible though)

ajit kasabale
Tera Expert

Hello Kishor ,

We can able to make default attachement on catalog item I already did that please follow below steps .

Step 1:  Create one Ui Macro with following code 

<a href="/sys_attachment.do?sys_id=Provide SYS_ID of attachment" > Upload Template</a><br/>
<a href="/sys_attachment.do?sys_id=Provide SYS_ID of attachment" >Sample Data</a>
 

ajitkasabale2_0-1676389641022.png

 


Steap 2: On catalog item create one variable and select variable type as Custom with lable 

 

Step 3: just add your attachment on catalog item then enty will created in Sys_attachement table just copy the sys_id of attachemnt and paste in code. 
Step 4 : once variable created in type specification you can able to see macro reference field are present now just provide the name of you ui macro  

ajitkasabale2_1-1676389881925.png

 

Step 5: once done this things just go to service catalog and you can see the variable is created as link when you click on that automatically attachment will be dawonload on your desktop.

ajitkasabale2_2-1676390217194.png

 

 

If this information helpful then mark it as correct and share it who need this information.