What is action.setRedirectURL();

Sidhu9
Tera Contributor

Thanks & Regards

Srinu

 
Thanks& Regards
Sidhu !
1 ACCEPTED SOLUTION

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Srinu ,

 

action.setRedirectURL(url);-

As part of a UI action, you may want to redirect a user to a URL. For example, you might add links to a form or open a new record after it is created from a UI action. To redirect a user to a URL from a UI action, use this syntax to define the redirect link:

action.setRedirectURL('http://www.mysite.com/mypage.htm');

 

Please mark my answer as helpful/Correct so that these threat will close and it will benefitted to others as well.

 

Regards,

Gunjan 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

View solution in original post

6 REPLIES 6

Allen Andreas
Administrator
Administrator

Hi,

I notice that you commonly just sort of ask a question, without much context to it. You can easily search google and/or the forums and see more information about this.

But, to answer your question, It's a way to redirect the user. A common use for example is for a server side UI Action where the user clicks the button to resolve an incident, then they can be redirected somewhere...or to the same page sort of like a refresh.

More explained here, with the post at the bottom: https://community.servicenow.com/community?id=community_question&sys_id=5d46cba1db1cdbc01dcaf3231f96...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

 

Please refer below links, You will get help to understand

 

https://docs.servicenow.com/bundle/newyork-application-development/page/app-store/dev_portal/API_ref...

 

Please mark as correct/helpful, If you find any help

Hi Kajal,

That should be directed at the author of this post, not replied to me.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Ankur Bawiskar
Tera Patron
Tera Patron

@Srinu 

You should be able to understand it from below links

Create a UI routing action

SETREDIRECTURL AND SETRETURNURL

Complete Tutorial of UI Action in ServiceNow with Examples

Regards
Ankur

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