Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

EFT payment File export

Posted on by 106
Hello,
 
Can anyone advise if there is a place that I can change the extension of the EFT payment file. At the moment it exports as txt, but my client insists that they want it exported as an aba file for Australian banks.
 
Regards
Debbie
Categories:
  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    EFT payment File export
    Hi,
     
    In my case I have created a separate button on EFT Register page and took the new file extension as ".aba", see below if it help you
     action("CreateFile")
                {
                    ApplicationArea = all;
                    Caption = 'Create EFT File';
                    Image = "Report";
                    Promoted = true;
                    PromotedCategory = "Process";
                    PromotedIsBig = true;
                    Visible = CreateEFTExternalDocVisible;
                    ToolTip = 'Executes the Create EFT File action.';
                    trigger OnAction()
                    var
                        BankAcc: Record "Bank Account";
                        EFTManagement: Codeunit <YourCU>
                    begin
                        if not Confirm(ConfirmExportQst, false, rec."No.") then
                            Error('');
    
                        if BankAcc.Get(rec."Bank Account Code") then
                            EFTManagement.CreateFileFromEFTRegister(Rec, rec."File Description", BankAcc);
                    end;
    
                }
    
    
     procedure CreateFileFromEFTRegister(var EFTRegister: Record "EFT Register";FileDescription: Text[12];var BankAcc: Record "Bank Account")
        begin
            GetSetup;
            if EFTRegister."EFT Payment" then begin
                EFTRegister.TestField(Canceled, false);
                OpenFile;
                //CreateFileEFTPayment(EFTRegister, FileDescription, BankAcc);
                CloseFile(EFTRegister, FileDescription, BankAcc);
            end;
        end;
    
      procedure CloseFile(EFTRegister: Record "EFT Register";    FileDescription: Text[12];    BankAccount: Record "Bank Account")
        var
            NewStream: InsTream;
            FileMgt: Codeunit "File Management";
        begin
            EFTRegister.LockTable();
            EFTRegister.Find;
            EFTRegister."Total Amount (LCY)" := TotalAmountLCY;
            EFTRegister."File Created" := Today;
            EFTRegister.Time := Time;
            EFTRegister."File Description" := FileDescription;
            EFTRegister."Bank Account Code" := BankAccount."No.";
            EFTRegister.Modify();
            Tempblob.CreateInStream(EFTFileInstream);
            ServerFileName := gvfileDescription + '.aba';
            IF CanDownloadFile THEN BEGIN
                DOWNLOADFROMSTREAM(EFTFileInstream, 'Export', '', '', ServerFileName);
                MESSAGE(Text11002, TotalAmountLCY);
            END;
        end;
     
     
     
     
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans