- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 06:48 AM
Hi,
I have one UI Action Print on the form.
I'm calling Printing info UI Page in Print UI Action. It's working but it redirects to the current page. But I need to open Printing info UI page in new tab
UI Action script:
function openRepeatIncident() {
var dialog = new GlideDialogWindow("asp_apartment_printable_info");
dialog.setTitle(getMessage("Do you want to print the latest saved values of this form?"));
dialog.setPreference('warning', true);
dialog.setPreference('title', getMessage("Changes you made were not saved. The printing will be generated with the previously saved values."));
dialog.render();
}
function onPromptComplete(){
top.window.location = '/asp_apartment_printable_info.do?sysparm_sys_id='+ g_form.getUniqueValue() +'&sysparm_direct=true, target="_blank"';
}
I tried window.open in place of top.window.location, Then UI Action is not working.
top.window.location working but the UI page does not open in the new tab.
Anyone help me.
Thanks,
Raj
Solved! Go to Solution.
- Labels:
-
Multiple Versions
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 07:29 AM
Hi Raj,
try this once
g_navigation.openPopup('/asp_apartment_printable_info.do?sysparm_sys_id='+ g_form.getUniqueValue() + '&sysparm_direct=true');
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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
03-24-2020 06:55 AM
Hi Raj,
You can try the below thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 07:29 AM
Hi Raj,
try this once
g_navigation.openPopup('/asp_apartment_printable_info.do?sysparm_sys_id='+ g_form.getUniqueValue() + '&sysparm_direct=true');
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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
03-24-2020 09:03 PM
Hi Ankur,
Thanks for your support.
It's working well If I want to open in a new window. What we do.
Thanks
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2020 12:19 AM
Hi Raj,
Not sure whether this is supported currently by ServiceNow.
Saying this, I will appreciate if you close this thread, as answered.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader