- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2016 12:14 PM
If I create a List Context Menu UI Action, and I specify it as Client (meaning that it will run a client script rather than a server script), then how do I know on which record it is running? My list is a related list. If I use g_form functions, they appear to pull information about the parent record, not the related list row on which I have right-clicked and invoked my UI Action.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2016 01:17 PM
I'll share my thinking to find this information with you as it was quite simple to find this information.
I simply made a filter on the UI Actions table:
List context menu IS true AND
Client IS true
Then I simply looked inside the OOTB scripts and there seems to be two way to get it:
- Using the g_sysId variable which is available (in Helsinki at least)
var sysId = g_sysId;
2. Using the rowSysId variable if defined, otherwise using gel to get it.
if (typeof rowSysId == 'undefined')
sysId = gel('sys_uniqueValue').value;
else
sysId = rowSysId;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2016 01:17 PM
I'll share my thinking to find this information with you as it was quite simple to find this information.
I simply made a filter on the UI Actions table:
List context menu IS true AND
Client IS true
Then I simply looked inside the OOTB scripts and there seems to be two way to get it:
- Using the g_sysId variable which is available (in Helsinki at least)
var sysId = g_sysId;
2. Using the rowSysId variable if defined, otherwise using gel to get it.
if (typeof rowSysId == 'undefined')
sysId = gel('sys_uniqueValue').value;
else
sysId = rowSysId;