The CreatorCon Call for Content is officially open! Get started here.

How to pass sys_id of ritm from a UI action to client script of a UI page

Sharan Ellendul
Tera Contributor

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

Sandeep Rajput
Tera Patron
Tera Patron

@Sharan Ellendul Try passing the sys_id via a parameter in the URL of your UI Page.

Thomas Geesman
Tera Contributor

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>