- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2017 06:23 AM
Hello everyone
I've been trying to find out if I can access the code that defines the reference icon preview button. I have a requirement to develop something to display some caller info, without actually leaving the incident record. Now because of some limitations I can't add it to the popup_view, so I decided to do a new UI Macro.
The UI Macro onclick works fine, I used GlideDialogWindow and I can load the info. The thing is GlideDialogWindow loads a new window and kind of fuzzes out the rest of the page in the background. I was looking to do something more similar to the behaviour the reference icon preview has (loading the info on small window, on mouse over, without fuzzing out the rest of the page, and closing the window when the mouse leaves the button).
Is this achievable? Is there a way to see the code that is doing this for reference fields?
Thank you,
Jose Valente
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2017 04:26 AM
Try something like this, it worked for me...
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<script>
<a id="test_id" onmousemove="g_popup_manager.enqueue(event, '', 'my_test_ui_page.do', '', 600)" onmouseout="g_popup_manager.destroypopDiv()" >hover here</a>
</j:jelly>
The result:
And again, being an unpublished API, I have no idea what the future may hold for it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2017 10:34 AM
Take a look at field_decorations (for non-references) and ref_contribution (for references). There is an example here ('Add Me' UI macro for User and Group Fields - ServiceNow Guru ). Both are controlled by dictionary attributes (Available attributes )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 06:08 AM
Hello Joe,
Thanks for the help. As I've said, I already have a UI Macro working, loading a GlideWindow. What I was wondering is if there's anyway to make it work like the reference icon.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 10:11 AM
Sorry Jose, maybe this is more aligned to what you are doing. I believe the Reference popups use the GlidePopup javascript include. You can see it in the sources when you have the browser developer tools open. As far as I'm aware it is not a published API, but there to support platform functionality. That may play into your decision as to whether to pursue using it. I was able to get the following to work with a ui macro decorator opening a custom ui page. I had to pad out the ui page name 2 characters for some reason:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<a id="test_id">hover here</a>
<script>
<script>function hoverStart(e) {g_popup_manager.showForm('xxmy_test_ui_page.do','','');}
$j('#test_id').mouseover(hoverStart);</script>
</j:jelly>
Alternately, you could implement similar functionality which should just involve some HTML work to hide and show a div and hover over event handlers. Then you wouldn't be reliant on the unpublished API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2017 04:00 AM
Hello Joe,
Thank you, this seems to be exactly what I need! I can display a custom UI Page in a popup with that code. Now the new issue is the popup is showing up in the right bottom corner of the page and it's way too big.
I've been looking at the GlidePopup javascript code. I can see a function 'queuePop' which should be the one that calls 'showForm' later, but apparently lets you set up a width, and the 'lastX' and 'lastY' variables might be the starting position? (not sure about it tho). However I can't seem to make it work calling 'queuePop'.
Were you able to make it work calling 'queuePop'? Either that or 'enqueue' or 'enqueue2' maybe.
Thanks!