AddCasePrint
This function adds attachment created from case print.
Syntax
AddCasePrint("fileName");
AddCasePrint("fileName","fieldName");
AddCasePrint("fileName","fieldName","toPDF");
Function arguments
- fileName – (String) Name of the resulting file;
- fieldName – (String) [optional] Name of the document type field where the generated file will be placed;
- toPDF – (Boolean) [optional] Set true if the generated file should be in PDF format and then the file name should contain „.pdf” extension.
Return value
This function returns Boolean.
Returns true if attachment was created, otherwise return false.
Examples
Example 1:
This will add file named print.html with case print to document list named
AddCasePrint("print.html");
Example 2:
This will add file named print.html with case print to field named print
AddCasePrint("print.html","print");
Example 3:
This will add file named print.pdf with case print converted to pdf to field named print
AddCasePrint("print.pdf","print", true);