Print

SendAttachmentToOCR

SendAttachmentToOCR() function sends a document to the Skanuj.to OCR system. It may send the first document from the case attachment list or the document placed in some field on the case form.

Syntax

SendAttachmentToOCR();
SendAttachmentToOCR(fieldName,companyId);

Function arguments

  • fieldName – (String) [Optional] a name of the document-type field from which a document will be sent to the OCR system. If empty then the first document from the case attachment list will be sent.
  • companyId – (String) [Optional] if provided then this value will override the „SkanujToCompanyId” system parameter.

Return value

This function returns Boolean.
Returns true if the document was sent successfully, false otherwise.

Examples

Example 1:
This sends the first document from the case attachment list to the OCR system. If the document was already sent it does nothing.

SendAttachmentToOCR();

Example 2:
This sends a document from the „Invoice” field to the OCR system. If the document was already sent it does nothing. The document will be sent with a company id taken from the „companykey” field.

SendAttachmentToOCR("Invoice",[companykey]);

Example 3:
This sends the first document from the case attachment list to the OCR system. If the document was already sent it does nothing. The document will be sent with a company id taken from the „companykey” field.

SendAttachmentToOCR("",[companykey]);

Example 4:
This sends only first page of the document placed in the „Invoice” field. There must be an additional document-type field „First page” on the case form where an extracted page is placed.

file=ExtractPagesFromDocument("Invoice",1,1);
file.fileName="firstpage.pdf";
[First page]=file;
SendAttachmentToOCR("First page",[companykey]);
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?