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

Is there a way to call a ui page from a ui action without clicking client checkbox?

Ulrich Matthew
Tera Contributor

I need to call a ui page from a UI action , but client checkbox needs to be unchecked 

function confirmAction() {

	var dialog = new GlideDialogWindow('show_termination_reason');
	dialog.setTitle('Resolve');
	dialog.setPreference('sysid', g_form.getUniqueValue());
	dialog.render();
}

 

this confirmAction() needs to be something else , so that when I click the button , it redirects to the UI page 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

not possible.

Unless the UI action is client side the UI page cannot open as GlideDialogWindow class is for client side

What you can do is this

1) Make the UI action server side and on click of that UI action redirect to the URL of UI page

URL of UI page - the URL you see when you click on Try it

Something like this

var url = '/ui_page.do?sys_id=sysIdOfUIPage'; // give sysId of the ui page
action.setRedirectURL(url);

Regards
Ankur

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

View solution in original post

4 REPLIES 4

Mohith Devatte
Tera Sage
Tera Sage

Hello,

I think you cant do that because UI page is also a POP up kind of thing and which is a client side action so client check box is needed for sure

But may i know why do you need it other way ?just curious

Please mark my answer correct if it helps you

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

not possible.

Unless the UI action is client side the UI page cannot open as GlideDialogWindow class is for client side

What you can do is this

1) Make the UI action server side and on click of that UI action redirect to the URL of UI page

URL of UI page - the URL you see when you click on Try it

Something like this

var url = '/ui_page.do?sys_id=sysIdOfUIPage'; // give sysId of the ui page
action.setRedirectURL(url);

Regards
Ankur

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

Hello,

I can redirect the UI Page using the code above, but I can't get the data that is on the UI Page.

@abc_12 

can you post a new question for this and tag me there as this is an older thread?

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