Redirect a url

Rosy14
Tera Guru

Hi,

 

How can i redirect a specific url whenever it is opened?

15 REPLIES 15

HTML:

<a href = "{{data.addToCalender}}" target="_blank">
<button class="btn btn-primary action-btn pull-right">
Add to calendar
</button></a>

Server:

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

Its downloading like that

Rosy14_1-1707813393974.png

I want to close this url after downloading

 

@Rosy14  , did you tried the solution which I had Provided?

 

Regards,

Shyamkumar 

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

yes I tried, but in previous page it is reflecting not in the next page where the download performing

Hi Rosy,

 

It will not be straightforward if its a portal ui action. You need to tell it what to do. Here is something you can get an idea from: https://www.servicenow.com/community/developer-articles/workaround-to-use-action-setredirecturl-in-p...

 

Warm Regards,

Shivambi

Is there any way whenevere this url come it will automatic redirect. in BR or client script have to add table/condition. So i want it will happen all time