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

XMLPort import without query

(0) ShareShare
ReportReport
Posted on by 225

Hi,

we want to Import a csv-file with a xmlport. The Import works fine but I have to choose the file every time. The file is always stored in the same folder. So we want to press the button and the import starts without a query. 

Here is the code for the button on a page. 

    procedure ImportXML()
    var
        ImportXmlFile: Text;
        XmlINStream: InStream;
        IsImported: Boolean;
        xmlPortXmlPort 50100;

    begin
        ImportXmlFile := 'C:\Users\xxx\Desktop\test.csv';
        UploadIntoStream('Import''''', ImportXmlFile, XmlINStream);
        xmlPort.SetSource(XmlINStream);
        IsImported := Xmlport.Import;
        if (IsImported = truethen
            Message('The import from XML is complete.')
        else
            Message(GetLastErrorText);

    end;
}
How can we make it work, that we can import the file without a query. I have already tried different things but nothing works. 
I have the same question (0)
  • Suggested answer
    THE Italian Profile Picture
    Microsoft Employee on at

    have you tried this blog post?

    robertostefanettinavblog.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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,184 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,148 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 677

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans