web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Mapping custom field in ACH Detail table to custom field in Vendor Bank Account table

(8) ShareShare
ReportReport
Posted on by 274
Hello. I'm trying to map a custom field in the ACH Detail table - Field ID 50001 (Bank Account Type) to a custom field in the Vendor Bank Account Table - Bank Account Type for generating EFT files.
 
 
When I try to generate the EFT file for a payment, I'm getting the error below.
 
 
It seems like the bank account type value from the vendor bank account isn't getting carried over to the EFT file. Am I missing any configurations with the custom fields or does the mapping require development with AL code? If further development is required, can you please share some suggestions on how to write the AL code? Thanks!
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at
    Could you provide some detailed error information from the Share details?
    It looks like the value wasn't retrieved, but since this control seems like a custom one, I'm not sure.
     
    Thanks.
    ZHU
  • AK-13051749-0 Profile Picture
    274 on at

    Here are the error details:

     

    If requesting support, please provide the following details to help troubleshooting:

    Error message:
    Bank Account Type must have a value in ACH US Detail: Data Exch. Entry No.=3, Data Exch. Line Def Code=DETAIL. It cannot be zero or empty.

    Internal session ID:
    839737dd-e005-42c9-a221-33d57f3dd361

    Application Insights session ID:
    d5ce2ad1-01ae-4e12-bfa2-c8c667290469

    Client activity id:
    1b1e0b7b-a6f8-48fe-9971-a297e0aed931

    Time stamp on error:
    2025-08-28T00:22:41.7848942Z

    User telemetry id:
    a861635b-3e4d-4061-8c3d-83e99c19591f

    AL call stack:
    "EFT Export Mgt"(CodeUnit 10331).CheckOptional line 13 - Base Application by Microsoft version 26.4.37194.37992
    "EFT Export Mgt"(CodeUnit 10331).ProcessColumnMapping line 31 - Base Application by Microsoft version 26.4.37194.37992
    "EFT Export Mgt"(CodeUnit 10331).InsertDataExchLineForFlatFile line 10 - Base Application by Microsoft version 26.4.37194.37992
    "Exp. Mapping Det EFT US"(CodeUnit 10328).OnRun(Trigger) line 18 - Base Application by Microsoft version 26.4.37194.37992
    "Exp. Launcher EFT"(CodeUnit 10320).ProcessDetails line 50 - Base Application by Microsoft version 26.4.37194.37992
    "Exp. Launcher EFT"(CodeUnit 10320).EFTPaymentProcess line 48 - Base Application by Microsoft version 26.4.37194.37992
    "Generate EFT"(CodeUnit 10098).CheckAndStartExport line 12 - Base Application by Microsoft version 26.4.37194.37992
    "Generate EFT"(CodeUnit 10098).StartEFTProcess line 57 - Base Application by Microsoft version 26.4.37194.37992
    "Generate EFT"(CodeUnit 10098).ProcessAndGenerateEFTFile line 18 - Base Application by Microsoft version 26.4.37194.37992
    "Generate EFT Files"(Page 10810)."GenerateEFTFile - OnAction"(Trigger) line 7 - Base Application by Microsoft version 26.4.37194.37992
     

  • AK-13051749-0 Profile Picture
    274 on at
    If the "Optional" checkbox is not checked for the Bank Account Type field in the field mapping, then I am getting that error. If the checkbox is checked, then the EFT file is getting generated with a blank bank account type even though the vendor bank account has a bank account type.
     
     
     
    The only development I have done so far for this is adding a custom "Bank Account Type" field to the ACH US Detail table and the Vendor Bank Account table. Do I have to customize either the pre-mapping or mapping codeunit for this? If so, can you please provide some guidance? Thanks!
  • Suggested answer
    Jeffrey Bulanadi Profile Picture
    9,112 Super User 2026 Season 1 on at

    Hi,

    Mapping custom fields between the Vendor Bank Account and ACH Detail tables for EFT generation can be tricky, especially when relying on the Data Exchange Framework. The error you're seeing typically means the field isn’t being populated during the transformation phase, and yes, it often requires AL development to bridge the gap.

    Here’s how to approach it:

    First, confirm that your custom field (Bank Account Type) exists in both tables with matching field numbers and compatible data types. The Data Exchange Framework uses field number alignment when applying TransferFields, so mismatches will silently fail.

    Next, check your Data Exchange Definition and Line Definition setup. If the field is marked as “Optional” in the mapping, it may be skipped unless explicitly populated. If it’s required, and the value is missing, you’ll get the error you described.

    To ensure the value flows correctly, you’ll likely need to extend the mapping logic in one of the following codeunits:

    • Data Exch. Mapping Codeunit (typically Codeunit 1601 or a custom derivative)
    • ACH US EFT Export logic, if you’re using the standard US EFT format

    In your AL code, you can manually assign the value during the transformation phase:

    al
    ACHDetail."Bank Account Type" := VendorBankAccount."Bank Account Type";
     
     

    You can place this inside a subscriber to OnBeforeInsertRecord or OnAfterTransferFields depending on your architecture. If you're using a custom Data Exchange Definition, you may also need to update the Field Mapping to include your custom field explicitly.
     

    Helpful references:
    Mapping the tables and fields to synchronize – BC
    How to setup EFT for payables and generate the ACH file – Crestwood
    How to flow/pass custom field values – Dynamics Lab
    Data Exchange Definitions – Microsoft Learn


    If you find this helpful, feel free to mark this as the suggested or verified answer.

    Cheers
    Jeffrey

  • Suggested answer
    Sohail Ahmed Profile Picture
    11,169 Super User 2026 Season 1 on at

    Can you clarify how you want to map the fields — are you doing it through Data Exchange Definition, EFT report customization, or directly with AL code? The approach will depend on where the mapping is needed.

     

    ✅ Mark this as the verified answer if helpful.

  • AK-13051749-0 Profile Picture
    274 on at
    Thank you, Jeffrey. Could you please provide an AL code sample of how I would extend the mapping codeunit? 
     
    I don't see any codeunit 1601 but the pre-mapping codeunit is 10327 and the mapping codeunit is 10328, so which one would I have to extend? Thank you.
     
  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at
    Hi, hope the following can give you some hints as well.
    Dynamics 365 Business Central: Add more custom processing when importing Bank Statement (Bank Export/Import Setup) – Customization
     
    Thanks.
    ZHU
  • AK-13051749-0 Profile Picture
    274 on at
    Thank you for the suggestions. Unfortunately, I am still having trouble figuring out which code unit to customize. I would appreciate if anyone could please help me figure this out. Thank you!
  • Suggested answer
    Sumit Singh Profile Picture
    11,757 Super User 2026 Season 1 on at
    Hi, 
     
    To map your custom field in ACH Detail (Field ID 50001) to the custom field in Vendor Bank Account (Bank Account Type) for EFT generation, you need to extend the Data Exchange Definition and mapping rules in AL.
    Add your custom fields to the Data Exchange Mapping and ensure the EFT export codeunit reads the Vendor Bank Account field and populates ACH Detail accordingly.
     
    May be below links might help you to review:- 

    Official Microsoft Docs

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans