customize GwtPollDialog

tanz
Tera Expert

Hi,

I want to customise the existing 

GwtPollDialog method in servicenow.
 
1. Can I set a different file name after the download rather than the table name
2. Can I set the specific columns which I need to download(If possible I want to write my own columns and map the data from the columns to excel colums). For ex: In servicenow it will show as description, when fetched in excel sheet the column will be Details of the issue and would map the same as description for the checked sysids). Also only specific columns should be downloaded and not all
2 REPLIES 2

Its_Azar
Tera Guru

Hi there @tanz 

 

To customize the `GwtPollDialog` \\ for setting a different file name and selecting specific columns, create a UI Action to trigger a custom download script using GlideAjax. In the Script Include, use GlideRecord to fetch the  data, map it to desired columns, and generate the CSV content with custom headers. Return the custom CSV content and file name to the client-side script, which handles the file download. \

 

If this helps kindly accept the response thanks much.

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.




Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG

 Microsoft MVP (AI Services), India

Hi @Its_Azar , Can I get some sample script with Incident fields, Columns will be ID and Details in Excel and will capture/map the fields Number and Short Description of selected incidents records from list view(using the checked list square check box which is visible right corner of every Incident, the same which we use to delete the selected Incidents). The file name will be IssueDetails.xlsx.