Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Attachement link not appearing in portal as required

Rosy14
Kilo Sage

Hi,

I have a widget. I created a button which will download the attachment from a attachment type field on form. After clicking the button it is going to some diffent link rather that what I want.

 

Its going to :

https://XYZ.service-now.com/now/nav/ui/classic/params/target/sys_attachment.do%3Fsys_id%3D+b3125b000...

 

but it should go:

https://XYZ.service-now.com/nav_to.do?uri=sys_attachment.do?sys_id=b3125b00000000000821ec4bcbf4

 

HTML:

<a href = "{{data.addToCalender}}+{{::item.u_zoom_link}}" target="_blank"> <span class="fa fa-calendar-plus-o"></span> Add to calendar</a>

 

server side:

data.addToCalender = gs.getProperty("glide.servlet.uri")+"nav_to.do?uri=sys_attachment.do?sys_id=";

 

Due to this it downloading a empty file with the same name. KIndly help.

 

1 ACCEPTED SOLUTION

AnirudhKumar
Mega Sage

Use this:

 

HTML:

<a href = "{{data.addToCalender}}+{{::item.u_zoom_link}}" target="_blank"> <span class="fa fa-calendar-plus-o"></span> Add to calendar</a>

 

server side:

data.addToCalender = gs.getProperty("glide.servlet.uri")+"sys_attachment.do?sys_id=";

View solution in original post

2 REPLIES 2

AnirudhKumar
Mega Sage

Use this:

 

HTML:

<a href = "{{data.addToCalender}}+{{::item.u_zoom_link}}" target="_blank"> <span class="fa fa-calendar-plus-o"></span> Add to calendar</a>

 

server side:

data.addToCalender = gs.getProperty("glide.servlet.uri")+"sys_attachment.do?sys_id=";

Thanks. Working now.