- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2016 12:01 AM
Hello,
I have an ui action on task form and am passing sys id of the task to script include to get more details from server side. But when i click the same UI action from Requeste item related list context menu this will not work because g_form.getUniqueValue() will give sys id of Req item instead of task sys id.
Please let me know how get sys id of an selected record from related list.
Regards,
Raghu
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2016 06:04 AM
kalai - yes it is List action button.
I got the solution for this, below code gives sys id for both form level or if any record selected from related list.
if (typeof rowSysId == 'undefined')
sysIdnew = gel('sys_uniqueValue').value;
else
sysIdnew = rowSysId;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2016 12:06 AM
Hello Raghu, see the Context Menus -> Available Variables documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2016 12:21 AM
Hi Raghu,
Yes obviously it will give reuest item sys_id only.
g_form.getUniqueValue() will give sys_id in client side what ever record of table you run.So it is on sc_req_item table record, that's why it give sys_id of that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2016 12:29 AM
Is it a list action button? Can you recreate this in a demo instance so that I can take a look ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2016 06:04 AM
kalai - yes it is List action button.
I got the solution for this, below code gives sys id for both form level or if any record selected from related list.
if (typeof rowSysId == 'undefined')
sysIdnew = gel('sys_uniqueValue').value;
else
sysIdnew = rowSysId;