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

Import Order with xmlport Error "Sales Header does not exists"

(0) ShareShare
ReportReport
Posted on by 5

Hello to All Users

I'm very new in developing BusinessCentral but I do my best to learn as fast as possible.

Actually I try to understand how the process for importing XML works.

For that i use Visual Studio Code for development.

I made an xmlport fpr Import Ordes 

pastedimage1666165665204v1.pngpastedimage1666165855677v5.png

Then I made an Page for testing 

pastedimage1666165722235v2.png

When i try to import the xml 

pastedimage1666165774597v3.png

I get an error 

pastedimage1666165799685v4.png

I don't know where the error comes from.

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,423 Super User 2026 Season 1 on at

    Hi

    You should set the Line element property like this:
    FieldValidate=FALSE

    this is because when the validate is triggered on the rows of an order, a check is made for the existence of the header which has not yet actually been entered on the DAtabase

    this is the function that blocks you on the Sales Line table:

    pastedimage1666171704280v1.png

    Greetings
    DAniele

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

    Also make sure you assign a correct line no. to the lines and either use AutoSave or handle the insert of your records in your code.

    learn.microsoft.com/.../autosave-property

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

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 580 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 480 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 261 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans