Save manual as PDF or print  


NVXCFT Cloud File Transfer


This app is comparable to a library and is used for file transfer in BC.

Current Version: 1.1.10.0 as of Business Central 22.

Manual


Creation date: 2024/11/25
The current version of this manual can be found at:

https://www.navax.app/help.php?AppID=NVXCFT&L=en


☰ Contents



General

  • App Cloud File Transfer

Setup

  • Cloud File Transfer Setup
    In this table the standard setup for the cloud file transfer is carried out...
  • Retention Policy
    A separate retention policy has been provided for the CFT File Archive...

Tasks

  • Working with Cloud File Transfer
    With the help of the codeunit CFTFileInterfaceMgtNVX files can be exported or imported according to the CFT setup...
  • Export Process
  • Import Process

Appendix

  • Release Notes

Docs  /  NVXCFT Cloud File Transfer  /  General
General

This app is comparable to a library - i.e. in principle it cannot be used on its own. The app will, however used for file transfer in BC.

Business Central in the Cloud

Here this app can be used with the help of a flow to save files on a server in the server landscape.

Caution

For the Flow a PowerAutomate Premium License is needed.

Business Central OnPrem

This app can be used with the OnPremise File Transfer app to save files locally in my own server landscape. OnPremise File Transfer

Docs  /  NVXCFT Cloud File Transfer  /  Setup
CFT Setup

In this table the standard setup for the cloud file transfer is carried out.

General, Fields

File Archive PathSpecifies the File Archive Path.
Transfer TypeSpecifies the Transfer Type of the File Transfer.

Defaults, Fields

Default UsageSpecifies the default usage.
Default Import PathSpecifies the default Import Path.
Default Export PathSpecifies the default Export Path.

Flow, Fields

Import Flow UriSpecifies the uri of the Flow used to import files.
Export Flow UriSpecifies the uri of the Flow to export files.
HTTP Request TimeoutSpecifies timeout in milliseconds for the HTTP Request. Default Valus i 100000 and maximum value should be 300000 (5 minutes).

Note

Will the OnPremise File Transfer App installed, the additnial Transfer Type OnPremise.
OnPremise File Transfer

Docs  /  NVXCFT Cloud File Transfer  /  Setup
Retention Policy

A separate retention policy has been provided for the CFT File Archive. The suggested value for the retention period is 6 month but it can be adjusted as desired.

Docs  /  NVXCFT Cloud File Transfer  /  Tasks
Working with the Cloud File Transfer

With the help of the codeunit CFTFileInterfaceMgtNVX files can be exported or imported according to the CFT setup. The app can either be used in a cloud database with flows or with the extension OnPremise File Transfer for OnPremise databases allow direct file access and thus bypass the flows. Which variant is used controls which apps are installed and what is set up in the CFT setup.

Setup of Flows

The export or import flow can be started via an HTTP request to one of the Uri defined in the CFT setup. The flows send an HTTP POST or GET request to the pages released as web service in order to import a file to BC or via e.g. export a file system connector to an existing folder.

Caution

Für den Flow wird eine PowerAutomate Premium Lizenz benötigt.
You can find in the repository 2 example files for an import or export flow. ExportFile_CloudFileTransfer_Demo_20220113070553.zip ImportFile_CloudFileTransfer_Demo_20211020045958.zip In these Flows are authentifications saved. These authentifications must be changed after the import of the template. At the import flow the username and password is set in the HTTP2 step. At the export flow the username and password are set in the HTTP as well the HTTP2 steps. An Azure Active Directory application with a secret is required for the login data. Enter the data like this:

Caution

An Azure Active Directory registration must first be set up by the cloud administrators on the tenant.
Here are the references for the setup: Automation APIS Using S2S Authentication V2 OAUTH Client Creds Grant Flow An on-premise data gateway is required to access local data on the on-premises infrastructure: Gateway Reference OnPremise Data Gateway If the gateway is set up correctly, a connection can be seen in PowerAutomate.

Note

The flow is running asynchronously in the default setup. If the flow has to be executed synchronously, this could be the case if the files has to be processed directly in the code calling the flow. Then the default flow has to be extended with an response-element. In the response-element (if existing) you can set up if the flow should be executed synchronously or asynchronously. Without a response-element the flow will be executed asynchronously.

tTsting the Flows

Once set up, the flows can be tested manually. In the CFT Files files can be imported or exported manually and the flows can be started manually. For this, the respective flow must already be set up in the CFT setup. With the on-premise variant, the flows do not have to be tested, of course, because they do not exist here.

Implementation in Applications

Example code for implementation in processes. The implementation is the same for using flows or OnPremise for using direct file access.

Export

The CFT file must be created before the export and the file to be exported must be stored in it as a blob. Then the export can be started.
    procedure ExportFile(FileName: Text; FileSubPath: Text; TempBlob: Codeunit "Temp Blob");
    var
        CFTFile: Record "CFT Files NVX";
        CFTSetup: Record "CFT Setup NVX";
        FileInterfaceMgt: Codeunit CFTFileInterfaceMgtNVX;
        RecRef: RecordRef;
    begin
        CFTSetup.Get();

        CFTFile.Init();
        CFTFile.Usage := CFTFile.Usage::SCHILLPDFFileExportNVX;
        CFTFile.TransferDirection := CFTFile.TransferDirection::Export;
        CFTFile.Filename := CopyStr(FileName, 1, MaxStrLen(CFTFile.Filename));
        CFTFile.FilePath := CopyStr(FileSubPath, 1, MaxStrLen(CFTFile.FilePath));
        CFTFile.ExportType := CFTFile.ExportType::Folder;

        RecRef.GetTable(CFTFile);
        TempBlob.ToRecordRef(RecRef, CFTFile.FieldNo(FileContent));
        RecRef.SetTable(CFTFile);

        CFTFile.Insert(true);

        FileInterfaceMgt.RunFileExport(CFTSetup, CFTFile);
    end;

Import

Before importing, the files must be imported and then they can be processed. The files are imported asynchronously, which means they may not have been imported yet when they are run through as shown in the code example.
    procedure ImportAllFilesFromImportPath(ImportPath: Text)
    var
        CFTSetup: Record "CFT Setup NVX";
        FileInterfaceMgt: Codeunit CFTFileInterfaceMgtNVX;
    begin
        CFTSetup.Get();
        FileInterfaceMgt.RunFileImport(CFTSetup, ImportPath);

        CFTFile.Reset();
        CFTFile.SetRange(Usage, Usage::MyUsage);
        CFTFile.SetRange(HasValue, true);
        if CFTFile.FindSet() then
            repeat
                ProcessImportedFile(CFTFile);
            until CFTFile.Next() = 0;
    end;

Docs  /  NVXCFT Cloud File Transfer  /  Tasks
Export Process

Export Prozess

A graphical illustration how the export process works.

Docs  /  NVXCFT Cloud File Transfer  /  Tasks
Import Process

Import Process

A graphical illustration how the import process works.

Docs  /  NVXCFT Cloud File Transfer  /  Appendix
Release Notes

Would you like to know what has changed in the extension?
Below you'll find an overview of the new features and changes made in the updates. Build-Overview in DevOps

NVXCFT 1.1.10.0

as of Business Central 22
2024/07/22
  • Corrections

    • Fixed an error that prevented the usage from being set during manual import.

NVXCFT 1.1.9.0

as of Business Central 22
2024/07/19
  • Improvements

    • Added a timout for HTTP Request used to start the flows into the setup.

NVXCFT 1.1.8.0

as of Business Central 22
2024/06/26
  • Improvements

    • Added a Retention Policy for CFT File Archive.
    • Updated Runtime to correspond the minimum dependency.

NVXCFT 1.1.7.0

as of Business Central 22
2023/10/19
  • Modifications

    • Adaptations for BC 23 compatibility.

NVXCFT 1.1.6.0

as of Business Central 18
2023/10/16
  • Improvements

    • Support for synchronous import and export flows. If the flow delivers a response and is set up not to be asynchronous, then the app can now work with that.

NVXCFT 1.1.5.0

as of Business Central 18
2023/06/21
  • Improvements

    • When automatically importing files, it is now possible to specify the usage.

NVXCFT 1.1.4.0

as of Business Central 18
2023/04/17
  • Corrections

    • When importing files with page CFT Import File (CFTImportFileNVX) the field Transfer Direction was not filled.

NVXCFT 1.1.3.0

as of Business Central 18
2023/05/01
  • Improvements

    • The table web service aggregate was used as normal table and not temporary.

NVXCFT 1.1.2.0

as of Business Central 18
2022/03/10
  • Improvements

    • When creating a new sandbox environment in the cloud all URLs will be deleted in the CFT Setup.

NVXCFT 1.1.1.0

as of Business Central 16
  • Corrections

    • The CFT Usage will now be used with names and no longer with captions. With this change the caption no longer has to be exactly the name.

NVXCFT 1.1.0.0

as of Business Central 16
  • Initial Version

  Save manual as PDF or print  
DE|EN Imprint