Get Form SysId from UI Macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-17-2020 09:51 AM
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?
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-17-2020 11:05 AM
you might need to move it to <g2:evaluate>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-17-2020 11:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-22-2020 03:03 PM
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.