edoc D365 FO archivelink Administration Guide
Breadcrumbs

Reindex incoming invoices after posting in the ERP system

If you use edoc invoice in conjunction with edoc D365 FO invoice cockpit, you must reindex the incoming invoices for the archiving of invoices in the ECM system.

Things to know

edoc archivelink receives an incoming invoice. Since the invoice has not yet been posted in edoc invoice cockpit, no invoice exists in Dynamics 365 for Finance and Operations that can be indexed by edoc archivelink.

You must set up a reindexing function so that invoices that are initially posted in edoc invoice cockpit can also be archived in the ECM system.

The following steps are required to reindex the corresponding document type:

  • Two new index definitions for reindexing.

  • Two new entries in automatic inbound processing.

  • Configuration for reindexing edoc invoice cockpit.

Creating the index definition for the document type

You create two new index definitions of type Attachment for the following tables:

  • VendTrans

  • VendInvoiceJour

Enter the following details:

  • Select the value edoc_invoice_id as the document type field and specify the indexing property this.EDBASInvoiceTable().InvoiceCockpitId in both index definitions.

  • In the Date received field, enter the indexing property DateTimeUtil::date(this.EDBASInvoiceTable().CreatedDateTime ).

For more information about configuring an indexing definition see: Configure the indexing definition

Define automatic inbound processing for the document type

Create two conditions for the automatic processing of incoming invoices and replace the placeholders with the corresponding values:

  • Under Select restriction criterion for the action, enter the value anchor.DocuTypeId == "<Document type ID for incoming invoice>" and under Action enter the value assignDocTo(VendTrans::edarlFindAccounPurchIdAndInvoice(index.get("<Document field ID for vendor number>"), index.get("<Document field ID for purchase order number>"), index.get("<Document field ID for invoice number>"))).

  • To end the process, enter the value anchor.DocuTypeId == "<Document type ID for incoming invoice>" under Select restriction criterion for the action and the value stopProcessing under Action.

For more information about configuring automatic inbound processing see: Configure automatic inbound processing for incoming documents

Configure reindexing for edoc invoice cockpit

To configure reindexing, you need the ID of the document type and the corresponding field. If required, you can enter the data under edoc archivelink > Setup > Systems > Systems in the corresponding system in the Document type and Document type fields sections.

Here's how

  1. Go to edoc archivelink > Setup > Bases > Parameter > edoc invoice cockpit.

  2. Select the corresponding document type ID under Document type ID.

  3. Under Invoice Cockpit ID - link field, select the linked field in the document ID.

  4. Under Used Batch processing task, select the Import documents entry.

  5. Activate the function.

The reindexing process is performed using the specified criteria.

Check the reindexing process

You can check the reindexing process in edoc archivelink as well as in edoc invoice cockpit:

  • In edoc archivelink, go to Inquiries > Documents and select a document. You can view the status in the edoc invoice cockpit - reindex section.

  • In edoc invoice cockpit, go to Frequently > Invoice cockpit and select a document. You can view the status in the document details under Related information > Reindexing status.


See also