Open URL in new browser window using UI Action in Custom Scoped Application - Jakarta

Lon Landry2
Tera Contributor

I am trying to open the URL for a Knowledge Article (KA) in new browser window using a UI Action in Custom Scoped Application - Jakarta

action.setRedirectURL works fine; but opening in a new window is required...

window.open('https://devXXXXX.service-now.com/kb_view.do?sysparm_article=KB0010001','_blank');

Does not work because selecting the Client option for a UI Action disables the button   (in Custom Scoped Application - Jakarta)

GlideDialogWindow('https://dev10457.service-now.com/kb_view.do?sysparm_article=KB0010001', true);

has not worked either.

I have a UI policy that opens the KA in a new window:

function onCondition() {

g_navigation.openPopup('https://dev10457.service-now.com/kb_view.do?sysparm_article=KB0010001', true);

}

but cannot figure out how to make a UI policy recognize a Button click (UI action).

Also I have tried populating the value of a field within the UI Action but

g_form.setValue('u_table', field); has not worked (in Custom Scoped Application - Jakarta)

Any ideas opening a URL in new browser window using UI Action in Custom Scoped Application - Jakarta???

Thanks for your time,

Lon

1 ACCEPTED SOLUTION

Thats great Lon. Can you please mark this thread answered so that it could help someone in future?



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

9 REPLIES 9

Lon Landry2
Tera Contributor

I am going to try that; but I need something that works on a form without going to a portal page.


window.open should work on form client script.



Otherwise try the below referred from Re: How to open a new window using UI action javascript after clicking a button?


find_real_file.png



Please mark this response as correct or helpful if it assisted you with your question.

Finally after months of looking for a solution the above post works for me in Jakarta for a custom Scoped application.



The only change I required was:


no semicolon at end of Onclick (the form deletes the semicolon on field change...)


works.png


Thats great Lon. Can you please mark this thread answered so that it could help someone in future?



Please mark this response as correct or helpful if it assisted you with your question.

Done.




Could not find the link earlier...




Thanks for your help and time,




Lon Landry