DeleteAttachment

This function returns the number of documents that are attached to current case.

Syntax

DeleteAttachment("field");
DeleteAttachment("all");
DeleteAttachment("invoice.pdf");

Function arguments

  • fieldName|fileName – (String) Name of the file field or name of the file from documents list. If set to „all” then all documents not assigned to fields will be deleted

Return value

This function returns Boolean.
Returns true if document was found and deleted, otherwise returns false.

Examples

Example 1:
This will delete file from Invoice field.

DeleteAttachment("Invoice");

Example 2:
Delete all documents from documents list in case. Does not delete documents from fields.

DeleteAttachment("all");

Example 3:
Delete file with invoice.pdf name from documents list.

DeleteAttachment("invoice.pdf");
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.