Rename the excel file when exporting
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 11:29 PM
Hi,
I have this script which is working fine in export . I want to rename the file before I click on download button
var checked = g_list.getChecked(); // get's the sys_id of the checked records
var query = "sys_idIN" + checked.toString();
var rows = checked.split(",").length; // rows to be sent to the export function
var view = "x_amspi_in_ewaybilltemplate_bulkupload"; // set this to default for columns present in default view for list layout
// set this to empty if you want all the columns present in the list layout including the customized ones.
if (rows <= 50) {
var dialog = new GwtPollDialog('x_amspi_in_ewaybilltemplate_bulkupload', query, rows, view, 'unload_excel_xlsx');
dialog.execute();
} else if (rows > 50) {
alert('Please be Informed that Number of records selected can not be more than 50');
g_list.refresh();
}
I want to rename the file as Ewaybilltemplate_bulkupload and instead of Page1 it will be Eway bill
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 11:34 PM
Hi @tanz,
please check below script:
var checked = g_list.getChecked(); // get the sys_id of the checked records
var query = "sys_idIN" + checked.toString();
var rows = checked.split(",").length; // rows to be sent to the export function
var view = "x_amspi_in_ewaybilltemplate_bulkupload"; // set this to default for columns present in default view for list layout
// set this to empty if you want all the columns present in the list layout including the customized ones.
if (rows <= 50) {
var dialog = new GwtPollDialog('x_amspi_in_ewaybilltemplate_bulkupload', query, rows, view, 'unload_excel_xlsx');
// Set the file name
dialog.setOption('file_name', 'Ewaybilltemplate_bulkupload.xlsx');
// Set the sheet name
dialog.setOption('sheet_name', 'Eway bill');
dialog.execute();
} else if (rows > 50) {
alert('Please be informed that the number of records selected cannot be more than 50');
g_list.refresh();
}
Thank you, please make helpful if you accept the solution.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 11:40 PM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 03:10 AM
Facing same issue