- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2017 04:27 AM
Hi,
I am getting some list of ID's by querying a table, now i need to assign all those ID's to a list field.
Please let me know how can i achieve this.
Thanks in Advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2017 05:38 AM
you need to do it like this
var arr = [];
var allChildRecords = new GlideRecord('sc_request');
allChildRecords.addQuery('parent', parentSysId);
allChildRecords.query();
while(allChildRecords.next()){
arr.push(allChildRecords.getValue('sys_id'));
}
current.list_field = arr.join(',');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2017 05:38 AM
you need to do it like this
var arr = [];
var allChildRecords = new GlideRecord('sc_request');
allChildRecords.addQuery('parent', parentSysId);
allChildRecords.query();
while(allChildRecords.next()){
arr.push(allChildRecords.getValue('sys_id'));
}
current.list_field = arr.join(',');