Options

Data insert from csv file to NAV table using XMLPORT

JaanuJaanu Member Posts: 44
edited 2015-01-13 in NAV Three Tier
Dear All,

I have assigned to a task of Data insert from csv file to NAV table using XMLPORT. I have created xmlport with Sales Line as base & Sales header insert through code, while i run & choose the file it shows error of

Microsoft Dynamics NAV


The field Document No. of table Sales Line contains a value (109015) that cannot be found in the related table (Sales Header).
OK


Kindly suggest me to complete the task. Please find the image file of xmlport.


Thanks in Advance,
Jaanu

Comments

  • Options
    postsauravpostsaurav Member Posts: 708
    Hi,

    This is the wrong way to insert Records as per your screen shots. Your are inserting Sales Line and then Sales Header.

    Work Around -
    You a Temporary Record in the XMLPORT Layout and then using code Init and Insert the Sales header and then the Sales line.

    Let us know if any issues. If the issue resolve using above approach please mark as Solved.

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • Options
    JaanuJaanu Member Posts: 44
    Thanks Saurav. I have done it with your suggestion. Now its working fine :)
Sign In or Register to comment.