- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 10:02 PM
Hi all,
I have a List choice UI action that utilizes both client and server side code.
I want to be able to get the chosen records in the server side code but g_list.getChecked() does not work server side. How can I achieve this?
Thanks for any help.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 05:06 PM
Check the code in this OOTB global list Delete UI action and see if it helps..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 11:11 PM
Hi Roni,
g_list is Client-side Glide APIs, http://wiki.servicenow.com/index.php?title=GlideList2_(g_list)#gsc.tab=0, which allows you to to create scripts to run in browser, I don't think you should be able to use the same on server side scripting.
What are you trying to do? Are your getting value from server side and then trying to pass to client. Not sure if that works.
But you should be able to achieve this using GlideAjax. You can do GlideAjax to get the record and then take appropriate action on client side.
Reference: UI Action: Can I pass a value from the client function to the server function?
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 12:20 AM
Hi,
Can you elaborate your requirement on exactly what needs to be achieved?
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 04:54 PM
Hi,
I am trying to duplicate a record once the ui action is pressed. But since I can't access the current variable in a client script I can't simply send the sysID of the current record and the selected elements to glideAjax. So how can this be done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 05:06 PM
Check the code in this OOTB global list Delete UI action and see if it helps..