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

How to redirect using declarative actions

Nolan4
Tera Contributor

Create a new action assignment(sys_declarative_action_assignment). Now how to redirect to a link?
In the implemented as we have many options like server script, client script, etc.

 

This is link I want to redirect to - 

https://abc.service-now.com/now/nav/ui/classic/params/target/%24pmview.do%3Fsysparm_view%3Dfinancial...

Not working at all for me.  Please replace abc and abc-sys_id with something from your instance.

 

 



1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Nolan4 

Make your Declarative Action Implemented as Client Script and use this syntax to open LINK

open(url);

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

View solution in original post

6 REPLIES 6

Sarthak Kashyap
Tera Guru

Hi @Nolan4 ,

 

Can you please try 

 

action.setRedirectURL(your_url);
 
Please mark my answer correct and helpful if this works for you
Thanks and Regard,
Sarthak

Thank you but this doesn't work here.

RaghavSh
Kilo Patron

In the declarative action client script try below:

 

top.location.href=“URL TO REDIRECT”;


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn

Ankur Bawiskar
Tera Patron
Tera Patron

@Nolan4 

Make your Declarative Action Implemented as Client Script and use this syntax to open LINK

open(url);

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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