Skip to main content

Notifications

Community site session details

Community site session details

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

How to import XML files automatically?

(0) ShareShare
ReportReport
Posted on by

Hello guys,

I would like to do the following:

I have some XML files that I want to import automatically into BC14.

I have already created the XMLPort that is responsible for importing the data from the XML file in a buffer table.

Do you have any idea how I can access the individual XML files in a folder by code?

First it should always be checked if new files have been added and if so, the files should be read in via XMLPort.

But how do I do that?


Many thanks for your support.


  • Suggested answer
    YUN ZHU Profile Picture
    84,265 Super User 2025 Season 1 on at
    RE: How to import XML files automatically?

    Hi, I think you are using BC 14 On-Premises.

    You can check Codeunit 419 File Management to see if there is a function that can be used.

    For example, NAV 2018: https://motochini.com/v11.00/object/cod/419

    More details:

    http://adeptris.com/dynamics-nav-export-and-zip-xmlport-files/

    Hope this will help.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,029 Moderator on at
    RE: How to import XML files automatically?

    Unfortunately all my personal sample code is from newer versions than the one you are on. But maybe this will help?

    simplanova.com/.../

  • Community Member Profile Picture
    on at
    RE: How to import XML files automatically?

    Hello,

    unfortunately this does not really help me.

    Do you have an idea where I can take a look at the import of an XML file in the form of code?

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,029 Moderator on at
    RE: How to import XML files automatically?

    You should check out the file management codeunit.

    docs.microsoft.com/.../

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans