How can I replicate Export as Excel in incident from list view?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2017 05:48 AM
Hi All,
Is it possible to create a new custom UI Action on incident list view to replicate Export as an Excel?
If yes then how can I proceed?
Thanks,
Kumar
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2017 07:53 AM
it dint work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2017 09:01 PM
Hi Ashwini,
Is it possible for you to share your code.
Thanks,
Shahnawaz Khan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2017 09:03 PM
Hi Ashwini,
Would it be possible for you to share your code.
Regards,
Shahnawaz Khan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2020 07:49 AM
Can you take a look and see what is wrong here, because its not working for me either. When I click on the UI action after I have ticked the records I want, nothing happens.
exporttoExcel();
function exporttoExcel() {
var sysparm_rows = g_list.grandTotalRows;
var num_rows = parseInt(sysparm_rows);
var selSysIds = g_list.getChecked(); // This will return the sys_id of the selected records
var sysIdList = selSysIds.split(',');
var sysparm_query = "";
for (var i = 0; i < sysIdList.length; i++) {
if (sysparm_query != "") {
sysparm_query = sysparm_query + "^OR" + "sys_id=" + sysIdList[i]; // Passing sys_ids to sysparm_query
} else {
sysparm_query = "sys_id=" + sysIdList[i];
}
}
var tableName = 'x_356387_taxiorder_taxi_order'; // Table Name for which the records needs to be exported
var sysparm_view = g_list.view;
// If the records are less then export threshold GwtPollDialog will export the records in .xls format
if (num_rows < g_export_warn_threshold) {
var dialog = new GwtPollDialog(tableName, sysparm_query, sysparm_rows, sysparm_view, 'unload_excel_xls');
dialog.execute();
return;
}
else {
// If the records are more then export threshold GwtExportScheduleDialog will export the records in .xlsx format
var dialog1 = new GwtExportScheduleDialog(tableName, sysparm_query, sysparm_rows, sysparm_view, 'unload_excel_xls');
dialog1.execute();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2021 03:04 AM
Hi
is it working?
Would it be possible for you to share your code .
Thanks,
Shradha