You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello colleagues,
We want to call function Reexport and be able to save the file to a network path, instead of the default Download folder. Therefore, we are requesting the implementation of an integration event as outlined below.
Before change:
procedure Reexport()
var
CreditTransReExportHistory: Record "Credit Trans Re-export History";
TempBlob: Codeunit "Temp Blob";
FileMgt: Codeunit "File Management";
begin
TempBlob.FromRecord(Rec, FieldNo("Exported File"));
if not TempBlob.HasValue() then
Error(PaymentsFileNotFoundErr);
CreditTransReExportHistory.Init();
CreditTransReExportHistory."Credit Transfer Register No." := "No.";
CreditTransReExportHistory.Insert(true);
if FileMgt.BLOBExport(TempBlob, StrSubstNo('%1.XML', Identifier), not ExportToServerFile) <> '' then begin
Status := Status::"File Re-exported";
Modify();
end;
end;
Requested change:
procedure Reexport()
var
CreditTransReExportHistory: Record "Credit Trans Re-export History";
TempBlob: Codeunit "Temp Blob";
//Remove>>>>
FileMgt: Codeunit "File Management";
//Remove<<<<
begin
TempBlob.FromRecord(Rec, FieldNo("Exported File"));
if not TempBlob.HasValue() then
Error(PaymentsFileNotFoundErr);
CreditTransReExportHistory.Init();
CreditTransReExportHistory."Credit Transfer Register No." := "No.";
CreditTransReExportHistory.Insert(true);
//>>>>
if Export(TempBlob) then begin
//<<<<
Status := Status::"File Re-exported";
Modify();
end;
end;
New function:
local procedure Export(var TempBlob: Codeunit "Temp Blob") Result: Boolean
var
FileMgt: Codeunit "File Management";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeExport(TempBlob, Rec, Result, IsHandled);
if IsHandled then
exit(Result);
exit(FileMgt.BLOBExport(TempBlob, StrSubstNo('%1.XML', Identifier), not ExportToServerFile) <> '');
end;
Event signature:
local procedure OnBeforeExport(var TempBlob: Codeunit "Temp Blob"; var CreditTransferRegister: Record "Credit Transfer Register"; var Result: Boolean; var IsHandled: Boolean)
begin
end;
Additional context
We have implemented a custom solution that allows exporting a file to a predefined network path.
Internal work item: AB#562590
The text was updated successfully, but these errors were encountered:
Describe the request
Hello colleagues,
We want to call function Reexport and be able to save the file to a network path, instead of the default Download folder. Therefore, we are requesting the implementation of an integration event as outlined below.
Before change:
Requested change:
New function:
Event signature:
Additional context
We have implemented a custom solution that allows exporting a file to a predefined network path.
Internal work item: AB#562590
The text was updated successfully, but these errors were encountered: