How to open/preview reference field records in UI builder?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 11:27 AM
Basically ask the title asks: how do you open/preview reference field records in UI builder (see screenshot below)?
I've made a UI builder page using the OOTB Record template as a base. I've tried just using both the read-only template and using a fully customizable template but I have had zero success in getting the preview record and magnify glass buttons to work.
The buttons don't work for OOTB using the read-only template so that isn't good news.
When using the fully customizable template, I tried hooking into the Preview Record and Item Selected events on the record tabs component, to no avail. I added a client script that console logs a message as the event handler for those two events, but I never got the message to log in my console.
How do I get this to work? I'm assuming there is just some configuration I'm missing. Am I hooking into the wrong events? Am I putting the event handlers in the wrong place? (Right now I am putting them in the record tabs component, but is the proper way to do it to put them in the page-level event handlers or maybe into an event handler for a data source?)
As per usual, documentation is not helping.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2022 02:32 AM
I know that this is coming from declarative actions.
Go to sys_declarative_action_assignment and Filter records with Action Modal= Field.
You'll see the actions labeled "Open Record". This is from where that icon is coming form.
I hope it helps in your investigation.
ServiceNow Community Rising Star 2022/2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2022 10:39 AM
As an update: haven't completely figured out how to get this working but for the magnify glass button, it seems to have something to do with route=modal_ref_lookup on the sys_ux_app_route table.
I'm assuming with proper configuration and/or scoping, one could get it to work consistently.
For some reason, a lot of these kinds of records are made in Global scope even though I am working within a scoped app.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 10:47 PM
Hi Maxim, have you found solution for this? We have encountered the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2022 01:02 PM
Nothing yet. Been poking around at the Record page template to see if I can figure out how to make it work or be able to reproduce it in a scoped app.