Caution
Für den Flow wird eine PowerAutomate Premium Lizenz benötigt.Caution
An Azure Active Directory registration must first be set up by the cloud administrators on the tenant.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. 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;
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;
Finmatics Autonomous Accounting Interface for AI-driven document processing tool by Finmatics. More information AppSource |