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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Error while exporting from D365 BC to XMl

(0) ShareShare
ReportReport
Posted on by 5

Hi, everyone

I created a form to export data to XML file


But when I export I receive this Error

Can someone tell what's the problem?

Thanks for replying

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    102,811 Super User 2026 Season 2 on at

    It looks like you have white spaces in elements names, which is not allowed in XML. Try removing it first.

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    You can refer the below link

    learn.microsoft.com/.../export-function--xmlport-

    CustXmlFile.CREATE('C:\XmlData\Customer.xml');  

    CustXmlFile.CREATEOUTSTREAM(XmlStream);  

    XMLPORT.EXPORT(50002, XmlStream);  

    CustXmlFile.CLOSE;

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 July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 548 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 417 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 377 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans