How to rename Zip file in Scheduled report

hemanthkj
Giga Contributor

Hello Team,

is there any option available to rename Zip output like ABC.CSV etc format. if yes please let me know how to make use of this functionality.

 

find_real_file.png

2 REPLIES 2

Rich Dennis
Tera Expert

The file gets created in the sys_attachment table before being emailed. Thus, you can create a Business Rule on that table to rename it to whatever you want.

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	current.file_name = "My New Filename.pdf";

})(current, previous);

Sachin G K1
Kilo Sage

Use before insert business rule:
lets suppose default filename is abc.csv, then:

Before Insert BR on "sys_attachment" table:
condition filter: filename is abc.csv.
Script:
current.file_name="ABC.CSV";