Config / Data Exchange / ANVEDI File Handler

ANVEDI File Handler

This codeunit is not available in Microsoft Dynamics 365 Business Central Online (SaaS).

This codeunit is used to sent or receive files from the local filesystem of the service tier or any UNC-network path that is accessible from the service tier.

You can select this codeunit in the communication channel and use the action Configure in the communication channel, to change the settings.

Fields

Communication Channel Code

This field is part of the primary key. This field is filled automatically.

Path

The local or network path you want to receive the files from or sent the files to.

File Mask

On incoming communication channels you can filter the names of the files that should be processed. This is a Dynamics filter string and case-sensitive. To filter without checking the case, you have to add the “@” sign in front of the filter.

@*.xml
Example: Receive all files ending with .xml. Do not filter case-sensitive and also accept .XML etc.

Action on Import

You can specify on incoming files what the module should do with the original file

Do Nothing

Leave it where it is. Warning: If you allow duplicate file names this will result in importing the file over and over again.
(The integer value of this option in the database is 0)

Archive

Archive the file after receiving it. The file will only be archived if it could be read. The module will archive files that cannot be processed, but are successfully retrieved (read).
(The integer value of this option in the database is 1)

Delete

Delete the file after receiving it. The file will only be deleted if it could be read. The module will delete files that cannot be processed, but are successfully retrieved (read). The data is still available from the EDI Message.
(The integer value of this option in the database is 2)

Archive Folder

The local or network path where the archived files should be written to.

Allow Duplicate Filenames

Whether a file with the same name can be retrieved by the same communication channel twice. You should only allow duplicate file names if you archive or delete the files.

Filename Template

A template string to build the file name. You can use any constant text that is valid inside file names. We support several global variables that can be used inside the filename. Because the module does not know the content of the file and the used buffer structures you cannot directly access data from the file.

The following variables are available:

{Entry No.}

The entry number of the transmission. Can be used to generate a unique filename.

{Reference No.}
{Reference}

Not supported in older versions. Output the reference number (document number) that is stored with the transmission. If business transactions are used it is automatically set.

{Description}

The description of the transmission.

{Sender Party}

Deprecated. Alias for {Sender Partner}.

{Sender Partner}

The sender partner code.

{Sender Identification}

The sender partner identification.

{Receiver Party}

Deprecated. Alias for {Receiver Partner}.

{Receiver Partner}

The receiver partner code.

{Receiver Identification}

The receiver partner identification.

{Project}

The project of the mapping that has generated the data.

{Format}

The format of the mapping that has generated the data.

{Code}

The code of the mapping that has generated the data.

{CCYY}

The year with century information, e.g. 2019.

{YY}

The year, e.g. 19.

{MM}

The month as two digits.

{DD}

The day as two digits.

{WW}

The calendar week, represented as two digits.

{QQ}

The quarter, represented as two digits.

{HH}

The hour of the transmission creation.

{mm}

The minutes of the transmission creation.

{ss}

The seconds of the transmission creation.

It is possible to create custom variables via the callback functionality of the module, if you need, for example, to include a document number in the filename.