- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2014 09:56 PM
Hi,
When I click on "pop-up" icon against any reference field, and perform any action (on click on any button eg Save), on the pop-up window it closes the pop-up window.
Is there a way I can avoid the pop-up window from closing on click.
Thanks,
Sony
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2014 07:25 AM
As far as I know, there is no such option in the base system. A possible workaround is to create a UI Script that would redefine the out-of-box function that opens the reference pop-up. The downside of this approach, however, is that if ServiceNow makes a change this feature in a future version of the product, your customization may stop working, so you will have to test it every time you do an upgrade. If you would like to give it a try anyway, create a UI Script with the following values:
Active: true
Global: true
Script:
function tearOff(table, sys_id, view, navigate) {
var key = sys_id;
var url = new GlideURL(table + '.do');
url.addParam("sys_id", key);
url.addParam("sysparm_view", view);
url.addParam("sysparm_stack", "no");
window.open(url.getURL(), "",
"toolbar=no,menubar=no,personalbar=no,width=800,height=600," +
"scrollbars=yes,resizable=yes");
if (navigate) {
gsftSubmit(document.getElementById('sysverb_back'));
}
}
The only difference between this script and the one built in the base system is that I removed line 7 which looked like this:
url.addParam("sysparm_referring_url", "tear_off");
To revert to the out-of-box behavior, either add that line back or deactivate your UI script.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2014 07:25 AM
As far as I know, there is no such option in the base system. A possible workaround is to create a UI Script that would redefine the out-of-box function that opens the reference pop-up. The downside of this approach, however, is that if ServiceNow makes a change this feature in a future version of the product, your customization may stop working, so you will have to test it every time you do an upgrade. If you would like to give it a try anyway, create a UI Script with the following values:
Active: true
Global: true
Script:
function tearOff(table, sys_id, view, navigate) {
var key = sys_id;
var url = new GlideURL(table + '.do');
url.addParam("sys_id", key);
url.addParam("sysparm_view", view);
url.addParam("sysparm_stack", "no");
window.open(url.getURL(), "",
"toolbar=no,menubar=no,personalbar=no,width=800,height=600," +
"scrollbars=yes,resizable=yes");
if (navigate) {
gsftSubmit(document.getElementById('sysverb_back'));
}
}
The only difference between this script and the one built in the base system is that I removed line 7 which looked like this:
url.addParam("sysparm_referring_url", "tear_off");
To revert to the out-of-box behavior, either add that line back or deactivate your UI script.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2014 07:27 AM
Hover over the reference icon and Press and hold the Shift key . A "X" will appear on the right top corner of the popup, now u can move your mouse away and the popup will stay till u hit the "X"