The CreatorCon Call for Content is officially open! Get started here.

is it possible redirect to url through script include??

Madankumar N1
Tera Contributor

Hi Team
I have one requirement
I have one UI Page for notify user it has to run continue here or it has to process background.

how i can perform actions in background process after process completion it has to redirect to one url which some records.

Could any body can help on this.

 

 

 

Thanks

Madankumar

14 REPLIES 14

No ankur 
Am performing action on client script .In Client script am calling script include to perform to insert records  after records insert i need to redirect to url

this operation has to perform on particular scenario only not always.

Hi Madan,

So in the UI page client script section; you are calling script include function; performing something and then want to redirect from the client script section itself

from client script you can redirect as below

window.location = url;

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Hi Ankur 
i need to directly redirect to url in script include it self no need to come back again to client script

Hi Madan,

Can you try this?

var url = "your url";

gs.setRedirect(url);

OR

var url =YOUR_URL;

this.response.sendRedirect(url);

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

i tried but no luck it is not working