Get Form SysId from UI Macro

chi-kwong
Giga Contributor

I have a UI macro where I would like to grab the Form's SysId and use it in some server side logic within the <g:evaluate> tag of the UI Macro

If I can get the sysId of the record, then I can grab the actual GlideRecord on the server side so that I can apply my logic.

I can't find out how to grab the sys id of the record, can you help?

3 REPLIES 3

Stephen Sturde
Tera Guru

chi-kwong
Giga Contributor

The following worked for me:

<j:set var="jvar_sys_id" value="$[JS:sys_id]"/>

I had to use the square brackets instead of curly ones to prevent browser caching. I'm sure the other ways would work to but I didn't get the chance to test them.