- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2022 07:26 AM
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
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2022 07:35 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2022 07:30 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2022 07:35 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 01:54 AM
Hello,
I can redirect the UI Page using the code above, but I can't get the data that is on the UI Page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 02:10 AM
can you post a new question for this and tag me there as this is an older thread?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader