Print

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");
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?