- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 11:08 AM
I have the following UI action I'm attempting to use from a related list:
var selected = g_list.getChecked();
var a = new userAdministration();
a.addToITIL(selected);
g_list.refresh();
Whenever I select this UI Action from a related list, I get the following error in the log:
org.mozilla.javascript.EcmaError: "g_list" is not defined.
Caused by error in <refname> at line 1
==> 1: var selected = g_list.getChecked();
...
I see that the wiki says g_list doesn't work for related lists, but then I'm seeing in the community that people are using this for related list UI actions. Does anyone know how to resolve this? This UI Action is only needed on a related list from a group record.
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 12:48 PM
Hi Arnab - thanks for pointing me in the right direction. I was able to send current.sys_id to my script include and it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 11:47 AM
Create an UI Action on the respective table and check the List Choice as True.
In Script portion write:
current.addToITIL = true;
current.update();
action.setRedirectURL("/table_name?sys_id=" +current.sys_id);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 11:52 AM
Hi Arnab,
Thanks for the suggestion, I've already created the UI Action with that selection. However, I need to send the list of selected items to a script include, which is why my UI action calls a SI. However, when I use g_list.getChecked(), I get an error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 12:48 PM
Hi Arnab - thanks for pointing me in the right direction. I was able to send current.sys_id to my script include and it works.