- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2017 11:23 AM
I have seen some partial solutions but haven't really come up with a good working solution as of yet. My use case is as follows:
Setup) I have glide.ui.clickthrough.popup set to true because for 99% of our users this behavior is more useful and preferred.
However, since the popup does not load related links (due to the sysparm_referring_url = tearoff), this is not working well for people with Request Item tickets. The users fulfilling request items like to be able to click on the reference icon next to the "Request" field on the form and be able to use the related links at the bottom to finish their requests.
(Example of the reference Icons I am referring to)
So, is there:
1) A way to have glide.ui.clickthrough.popup = false for Request only and not for the rest of our instance?
2) If not, how would I override the URL when it opens in a new window to remove the "sysparm_referring_url" portion? I have seen this Reference Icon click open in new window which states that a UI Action should be able to do it, but I am unsure of how to trigger that UI action when clicking on the reference icon? Excuse me, I am very new to ServiceNow. Thanks in advance for any assistance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2017 02:27 PM
Hi Nick,
You could create an onLoad Client Script on the Request (sc_request) table that runs the following script. This will remove the "tear_off" portion of the URL and load the related lists.
function onLoad() {
var href = document.location.href;
if (href.indexOf('sysparm_referring_url=tear_off') != -1) {
href = href.replace('sysparm_referring_url=tear_off', 'sysparm_referring_url=');
document.location.href = href;
}
}
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2017 02:27 PM
Hi Nick,
You could create an onLoad Client Script on the Request (sc_request) table that runs the following script. This will remove the "tear_off" portion of the URL and load the related lists.
function onLoad() {
var href = document.location.href;
if (href.indexOf('sysparm_referring_url=tear_off') != -1) {
href = href.replace('sysparm_referring_url=tear_off', 'sysparm_referring_url=');
document.location.href = href;
}
}
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 05:44 AM
Wow, I spent much more time yesterday than I would like to admit trying to figure this out. It works wonderfully, thank you so much! Out of curiosity, what is the importance of " if (href.indexOf('sysparm_referring_url=tear_off') != -1) "? Is it just saying "If sysparm_referring_url=tear_off exists?"
Either way, thanks so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 06:44 AM
This was added to stop it from entering a loop of reloading, which it did during my test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 06:50 AM
Genius... just really, really great. Thanks again so much.