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

Data Exchange Definition for a Payroll Import file

(0) ShareShare
ReportReport
Posted on by 911

I have a Payroll file that I wish to import into BC. I'm pretty sure I could fairly quickly write a codeunit in an AL extension to achieve the import I want, but I wondered if BC's standard functionality via Data Exchange Definition, Field Mapping and Transformation Rules would be able to handle this format of file?

I've been following the procedure on the link below, which was very helpful but I haven't managed to import the values I want.

https://robertostefanettinavblog.com/2019/09/24/import-payrolls-in-business-central/

Here's a sample import file:-

Acme Products - Dave - Month 6,,,,,,,,,,
Name,Surname,Gross Pay,Tax,Employee NICs,Employer NICs,Student Loan deduction,Global group - Employee Contribution,Global group - Employer Contribution,Global group - Total Contribution,Take-home pay
,,,,,,,,,,
"Month 6 - Ending 30 September, 2021",,,,,,,,,,
EMP,ONE,"1,026.67",0,0,0,0,0,0,0,"1,026.67"
EMP,TWO,"1,500.00",154,0,22.08,0,0,0,0,"1,346.00"
EMP,THREE,"2,500.00",0,0,0,0,0,0,0,"2,225.00"
TOTAL (3 employees),,"5,026.67",154.00,0.00,22.08,0.00,0.00,0.00,0.00,"4,597.67"

From this file, the only line to be imported is the last line (starting with TOTAL), and for each value on that line we need to create a new record in the Gen. Journal Line (81) table.
So the one input line will create 9 records in BC, each with their particular GL and Bal Account No, Description etc.

Can this be done without a custom import?

  • Suggested answer
    Dallefeld Profile Picture
    235 User Group Leader on at

    I believe that data exchange definitions are designed to be one line equals one transaction and that you will need a custom import.

  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    Kim is totally correct. You will need a customized import function supporting your file format.

  • Suggested answer
    JAngle Profile Picture
    159 on at

    Still feasible with data exchange definitions. You would need to use the target table as an intermediate table. You would require a custom codeunit to do the mapping once all the data is present. If the import file format is liable to change this method has some value. If it isn’t then your standalone custom codeunit is probably a nicer choice. DED’s are brilliant but sometimes constraining

  • Suggested answer
    YUN ZHU Profile Picture
    103,741 Super User 2026 Season 2 on at

    Hi, I agree with Kim, if you want to do this without customization, you need to manually edit your import file before importing to BC.

    And as you might know, this seems to be easy to do with XMLPort or Excel Buffer.

    Hope this also helps.

    Thanks.

    ZHU

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 727 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 512 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 321 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans