Accessing Current Record sys_id on UI Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2019 12:13 PM
I have been having difficulty with a glideModal UI Action that renders a UI Page. So far, my goal is to query the current task record's sys_id, and then display all related records associated with the task record on a custom scripted table.
I have used the <g:evaluate> to get all the information from the related records however, finding the current sys_id has been rather difficult.
My UI Action is displayed below:
and it renders this glideModal:
Here is a picture of my UI Page script: (do not have client or process side)
Having trouble with selecting the sys_id of the current record and portraying all related records.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2019 01:11 AM
You can do it by passing the value to the GlideModal:
var dialog= new GlideModal("name_of_the_ui_page");
dialog.setSize(1000,500);
dialog.setTitle("Title");
dialog.setPreference('record', g_form.getUniqueValue());
dialog.render();
And then retrieving that value in the UI page using <g:evaluate> like this:
<g:evaluate var="jvar_record" expression="RP.getWindowProperties().get('record')" />
or
<g:evaluate var="jvar_record" expression="RP.getParameterValue('record')" />