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

Hi mayur tejnani,


Thanks for the reply


       


window.location=URL;



this also give the same error as "Cannot read property 'open' of null"


Hi mayur tejnani,


                  Thanks for the reply


According to this given link Window is not supported


Mobile Client GlideForm (g form) Scripting - ServiceNow Wiki


ghsrikanth
Tera Guru

Have you tried using action.setRedirectURL(); in the UI Action



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



UI Actions - ServiceNow Wiki


I have tried action.setRedirectURL();


that is giving error as action is undefine in application scope


Please refer the screen shots given above..


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");