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.
SendAttachmentToOCR();SendAttachmentToOCR(fieldName,companyId);Function arguments
Dział zatytułowany „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
Dział zatytułowany „Return value”This function returns Boolean. Returns true if the document was sent successfully, false otherwise.
Examples
Dział zatytułowany „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]);