DownloadFile() function causes a specified file to be downloaded. Warning! This function can be used only in a manual rule.
DownloadFile(fieldName); DownloadFile(attachmentName); DownloadFile(stringContent, fileName);
- fieldName|attachmentName – (String) a name of the document-type field or a name of the file attached to the case;
- stringContent – (String) a string content that will be downloaded under the given file name;
- fileName – (String) a name of the file that will be returned containing the given string content.
This will download file from the „Invoice” field on the case form.
This will download a document with name „invoice.pdf” from the attachment list on the case form.
DownloadFile("a sample text to be downloaded as a file","sample_file.txt");
This will download the given text as „sample_file.txt” file.
This will download the given base64 encoded string (assuming that it is a generated ZIP content) as „invoice.zip” file.