Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how can redirect to external URL from script while creating button

manojlakshmanas
Kilo Expert

i need user to redirect to external page while clicking button.

1 ACCEPTED SOLUTION

manojlakshmanas
Kilo Expert

Hi


while pointing user to external URL page from UI Action client script this will be helpful to redirect.



        location.href = ("external page URL");


View solution in original post

21 REPLIES 21

Abdul Khan4
Kilo Guru

Hi,



Please go through the following Link if you are using UI Action for Button.


UI Actions - ServiceNow Wiki


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




Regards


Abdul



while using action.setRedirectURL i am getting   this error action.setRedirectURL is not a function      


abilash_017
Mega Guru

Hi,



Go through the snapshots.   Add conditions in conditions tab if necessary.1.JPG2.JPG



Click "Like" & "Helpful" if you found it is answered.