how to attach a file to link

immanuel1
Mega Contributor

Hi All,

I need to attach a excel file to below   link then if i click that link need to download that file.How to do please help

find_real_file.png

Thanks In Advance

1 ACCEPTED SOLUTION

chirag_bagdai
ServiceNow Employee
ServiceNow Employee

Hello,



You need to upload the file in the instance and you need sys_id of the attachment record.



1. Upload the file.


2. Get the sys_id of the attachment from sys_attachment table (/sys_attachment_list.do).


Screen Shot 2017-06-01 at 4.44.58 PM.png


3. Right click on the field and add below URL :


https://instance.service-now.com/sys_attachment.do?sys_id=1894eef4ef331000914304167b2256c2



Screen Shot 2017-06-01 at 4.41.42 PM.png



Let me know for any question.


View solution in original post

10 REPLIES 10

harishdasari
Tera Guru

Hi Immanuel,



You cannot directly attach file to the field.



if you want attach the file, then change field type to macro with label and write the UI macro for it to attach the Excel sheet.



Thanks


chirag_bagdai
ServiceNow Employee
ServiceNow Employee

Hello,



You need to upload the file in the instance and you need sys_id of the attachment record.



1. Upload the file.


2. Get the sys_id of the attachment from sys_attachment table (/sys_attachment_list.do).


Screen Shot 2017-06-01 at 4.44.58 PM.png


3. Right click on the field and add below URL :


https://instance.service-now.com/sys_attachment.do?sys_id=1894eef4ef331000914304167b2256c2



Screen Shot 2017-06-01 at 4.41.42 PM.png



Let me know for any question.


Hi Chirag Bagdai,



Is there any specific role required to upload files? i am admin.



Getting below page when i open the sys_attachment_list.do



find_real_file.png


Hi,



Please find below reference docs. link to find   which role is required for uploading attachment.  


Require a role to attach files



I would say you need to upload the attachment/excel file to any record for example KB article and then check in sys_attachment table and get the sys_id.



Use that sys_id in the link.