- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2023 10:59 PM
I want to use "LIST CHOICE" in a UI ACtion effectively..
suppose when I open any table... table.LIST , I will get some list of records... assume that if I select some records. and then If I click on that particular UI Action then I need to get all the selected records in some alert message...
based on that I can modify as per my requirement... just I want to know how to access the selected records..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2023 11:00 PM
you can get the selected records sysId using this
g_list.getChecked()
Based on that you can have your logic
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2023 11:00 PM
you can get the selected records sysId using this
g_list.getChecked()
Based on that you can have your logic
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2023 11:56 PM
Thanks for your quick response..
My requirement is to create the records in another table based on the selection.. so before writing gliderecord(in script include) just tried with logs.. somehow it's not working..
Followed like below.. Note: It's a scoped application
OnClick : getids()
Script:
function getids() {
var a = g_list.getChecked();
var b = new ABC().XYZ(a);
}
Script Include
var ABC = Class.create();
ABC.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
XYZ: function(id){
gs.info("Sathwik Test " +id);
},
type: 'ABC'
});
@Ankur Bawiskar can you please help me to understand what was wrong in it..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 01:15 AM
you should be using GlideAjax as your UI action is client side
this line won't work
var b = new ABC().XYZ(a);
Please use GlideAjax and send the selected sysIds as parameter
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader