OnAfterGenerateCaptureResults

<< Click to Display Table of Contents >>

Navigation:  Zetadocs SDK Guide > Zetadocs SDK API >

OnAfterGenerateCaptureResults

 

OnAfterGenerateCaptureResults Event

Runs after generating the record to associate the documents in the Document Queue, after archiving the document against the record, and before posting or deleting from the Document Queue.

 

Publisher

[IntegrationEvent(false, false)]

procedure OnAfterGenerateCaptureResults(var onAfterGenerateCaptureResultsHandler: Codeunit "Zdd OnAfterGenerateCaptureRes")

    begin

    end;

 

Subscriber

To subscribe to this event, you will need to decorate the subscriber method with the correct EventSubscriber attributes:

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Zetadocs Customize", 'OnAfterGenerateCaptureResults', '', true, true)]

local procedure OnAfterGenerateCaptureResults(var onAfterGenerateCaptureResultsHandler: Codeunit "Zdd OnAfterGenerateCaptureRes")

 

 

Zdd OnAfterGenerateCaptureRes codeunit

This codeunit exposes procedures that allow you to consolidate the records generated in regard to the document in the Zetadocs Document Queue.

Method name

Description

GetDocumentBarcodes(var List of [Text])

Will return the list of Barcodes referenced in a document.

GetDocumentId(): Text

Will return the name, or Document Id, of the document in the Document Queue.

GetDocumentQueueSettings(Record "Zetadocs Document Queue")

Will return the settings of the Document Queue being processed.

GetGeneratedRecordId(var RecordId)

Gets the Business Central record that is being linked to a document in the Document Queue.

GetShippingAddressInput() Text

Will return the shipping address extracted from the Document in the Document Queue.

SetError(Text)

This method can be used to send a custom error message to Zetadocs Capture and Delivery.

Init(...)

This method is called internally by the publisher, a call to this method will return an error.

 

GetDocumentBarcodes Method

Will return the list of Barcodes referenced in a document.

 

Syntax

onAfterGenerateCaptureResultsHandler. GetDocumentBarcodes(var documentBarcodes: List of [Text]);

 

Parameters

documentBarcodes

Type: List of [Text]

Returns a list of barcodes associated with the document id passed into the function, these can be used to link to a document in Business Central.

 

GetDocumentId Method

Will return the name, or Document Id, of the document in the Document Queue.

 

Syntax

onAfterGenerateCaptureResultsHandler. GetDocumentId() documentId: Text;

 

Parameters

documentId

Type: Text

Returns the document id that is being processed by Zetadocs Capture.

 

GetDocumentQueueSettings Method

Will return the settings of the Document Queue being processed.

 

Syntax

onAfterGenerateCaptureResultsHandler. GetDocumentQueueSettings(var documentQueueTemporaryRecord: Record "Zetadocs Document Queue");

 

Parameters

documentQueueTemporaryRecord

Type: Record "Zetadocs Document Queue"

The record variable that will store a copy of the settings used. This variable is expected to be a temporary table.

 

GetGeneratedRecordId Method

Gets the Business Central record that is being linked to a document in the Document Queue.

 

Syntax

onAfterGenerateCaptureResultsHandler.GetGeneratedRecordId(var recId: RecordId)

 

Parameters

recId

Type: RecordId

The Business Central document that the above document Id is linked to.

 

GetShippingAddressInput Method

Will return the shipping address extracted from the Document in the Document Queue.

 

Syntax

onAfterGenerateCaptureResultsHandler.GetShippingAddressInput() DeliveryAddress: Text

 

Parameters

DeliveryAddress

Type: Text

The Shipping address recognized in the document from the Document Queue.

 

SetError Method

This method is used to pass any custom errors to Zetadocs.

 

Syntax

onAfterGenerateCaptureResultsHandler.SetError(errorText: Text);

 

Parameters

Type: Text

The error message to pass to Zetadocs.

 

Init Method

Initialises the onAfterGenerateCaptureResultsHandler object with the relevant information. This will be done internally and is not for 3rd parties consumption.