Print

DownloadFile

DownloadFile() function causes a specified file to be downloaded. Warning! This function can be used only in a manual rule.

Syntax

DownloadFile(fieldName);
DownloadFile(attachmentName);
DownloadFile(stringContent, fileName);

Arguments

  • 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.

Return Value:

Returns true.

Type: Boolean

Examples:

DownloadFile("Invoice");

This will download file from the „Invoice” field on the case form.

DownloadFile("invoice.pdf");

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.

DownloadFile(base64Content,"invoice.zip");

This will download the given base64 encoded string (assuming that it is a generated ZIP content) as „invoice.zip” file.

Czy artykuł był pomocny?
0 na 5 gwiazdek
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
How Can We Improve This Article?