1

I'm creating a new Electronic Payment File Export Format by my own XMLPort. It is designed for CAIXABANK Confirming operations. Viewing the codeunit 1220 implementation I've seen that the filename is not changeable by any Event Subscriver...


In the Export procedure, we can found than code line:


 if not IsHandled then

            FileCreated :=

                FileManagement.BLOBExport(TempBlob, StrSubstNo('%1.XML', CreditTransferRegister.Identifier), UseCommonDialog) <> '';


I know that we coud play with the Credit Tranfer identifier via Serial Nos.... but the extension will always be XML, meanwhile the export format could be TXT or somthing else...


A possible solution could be create my own codeunit... but duplicate code may not be the best idea... more when the "reexporting process" of a payment file is done by the "Reexport" procedure in table 1205 (Credit Transfer Register):


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;


So, I think an Event to overwrite the filename in both cases (or store the filename generated with the blob field) would be a great solution.


Thanks

STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team