We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Download Attachment upon clicking an UI action in Workspace.

Swathi P
Kilo Sage

Hi All,

 

I have an UI action called Download Template in scoped application which downloads the attachment into system . I am trying to create a workspace View for the table and added the button in Form actions and added Workspace script . Upon clicking the Download Template button in workspace. It is redirecting to Picture 2 rather than downloading the attachment. IIt is working fine in UI 16 View Not working proper in Workspace. How to correct this . Please help.

 

Picture1:

find_real_file.png

Picture 2:

find_real_file.png

Thanks & Regards

Swathi Padighar

12 REPLIES 12

Hi,

 

I have written a code similar even though its redirecting to the same page.

 

find_real_file.png

Hi,

please share your entire script and UI action and Script include screenshots

It should work fine

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Inside the attachment url you also need to mention your instance url.

var invoice_url = 'https://dev-xxxxx.service-now.com/sys_attachment.do?sys_id=' + result.attachment_id;