Can I export a custom CSV file via UI action on the list page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2025 07:41 PM
Hi guys, I have a requirement that I have investigated but I am not sure about it. Our client has a custom CSV file, originally they can export from the UI action in a form. Now, they want to export custom CSV files for multiple records on the list page using UI action ( with the list banner button). Until now, I can not define whether we can download multiple records. Can you answer about this, whether we can implement it? If we can, what should we do? Thank you so much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2025 08:42 PM
since it's list banner, they need to select the checkboxes and then they can click
You will get the list of sysIds checked using this and then enhance it further
var sysIds = g_list.getChecked();
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-09-2025 08:47 PM
Hi, Your shared code is not enough to figure this out however technically its feasible but you have to change the code. Few instructions:
1. Check client
2. Use g_list..getChecked() method to get the sys_ids of the checked records
3. Use glideAjax and pass these sys_ids to a server side function written in a script include
4. Write your code in script include to iterate over all these records and create one csv file for all these ids
5. Return back the link to csv file
6. Redirect the user to download that file