How to get the selected record field values in LIst UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2018 05:56 AM
HI There!
I need to create a List UI action button for doing the below activity.
1. I should be able to compare all the selected records for thier delivery location, if the selected records have same location, then i should display error message.
2. I have achieved till getting the selected records sys id using g_list.checked(). But am trying to query that record using glideRecord method which is not working.
I have written the below client checked UI action. Please help me in with this and what needs to be done for this.
selSysIds = g_list.getChecked();
sysIdList = selSysIds.split(',');
alert('status - '+selSysIds);
for (var i=0;i<=sysIdList.length;i++)
{
alert('i is '+i);
alert('sys id is '+sysIdList[i]);
var a = "'"+sysIdList[i]+"'";
alert('a is '+a);
var gr = new GlideRecord('proc_po_item');
gr.addQuery('sys_id',a);
gr.query();
gs.addInfoMessage('rec ret '+gr.getRowCount());
if(gr.next()){
gs.addInfoMessage('no is '+gr.number);
}
}
if(typeof window == 'undefined')
serverReopen();
function serverReopen(){
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2019 04:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2021 08:15 AM
Hi,
Can you please share the code of script include to achieve this