Ui actions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2025 03:41 AM
i have created the button through ui action on the incident table and named as export csv. here when i click on that button i want to download the incident list in CSV formate. how can i aachieve this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2025 03:50 AM
Export to CSV is already there oob, why have you created anew one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2025 03:55 AM
@Anurag Tripathi
but end user doesn't know the functionality to get in csv.so, i make him easy to export
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2025 03:58 AM
function exportCSV() {
if (!confirm("Do you want to export the current incident list to CSV?")) {
return;
}
var gr = GlideList2.get('incident');
if (!gr) {
alert('Incident list not found.');
return;
}
var encodedQuery = gr.getQuery();
var view = gr.getView();
var orderBy = gr.getOrderBy();
var exportURL = '/incident.do?CSV' +
'&sysparm_query=' + encodeURIComponent(encodedQuery) +
'&sysparm_view=' + encodeURIComponent(view) +
'&sysparm_order=' + encodeURIComponent(orderBy);
window.location.href = exportURL;
}
does this script make sense for my above requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2025 04:15 AM
its an unnecessary technical debt for the platform, you should just train user how to use it.