How to pass sys_id of ritm from a UI action to client script of a UI page
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2024 04:36 AM
Hi,
I have UI Action on RITM, upon clicking it there will be a pop up displayed. Here I want to pass sys_id of RITM to the client script of a UI page. Could you please help on how achieve this?
Thanks in advance,
Sharan
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2024 04:43 AM
@Sharan Ellendul Try passing the sys_id via a parameter in the URL of your UI Page.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2024 04:49 AM
You will need to pass the sys_id of RITM to the UI Page. That looks something like this.
var dialog = new GlideDialogWindow('uiPage');
dialog.setTitle('My UI Page');
dialog.setPreference('sysparm_id', g_form.getUniqueValue());
dialog.setSize(550, 200); // consists of Height and Width
dialog.render();
}
After passing it, you can then access the sys_id in the ui page like this.
<g:evaluate var="sysparm_id">
var sysparm_id = RP.getParameterValue("sysparm_id");
sysparm_id;
</g:evaluate>