Xml import
pushpraj1008
Member Posts: 33
Hi All,
I'm trying to import xml file into Sales Invoice header & sales invoice Line i.e Table Sales header & Sales Line.
the xml file contains sales header & sales line, in sales line, Item No, Description & cross reference no is given.
If the Xml file does contain the Item No i.e "No." & its having Item Cross reference No, it should go Item Cross reference No and fetch the Item No. i.e my requirement.
but the probem is that Xml file contains Item No. = 0 (integer 0) & if try to import that file, it is not reading the last line of xml file which contain Item No. =0.
here is the code written on
No - Import::OnAfterAssignField()
IF "<Sales Invoice Line>"."No." =format(0) THEN BEGIN
CrossReference.SETRANGE("Cross-Reference No.",Cross_Reference_No);
IF CrossReference.FINDFIRST THEN
"<Sales Invoice Line>"."No." :=CrossReference."Item No.";
end;
I'm not getting any clue how to read the sales line of xml file whihc contains Item No is equal to 0(zero), becasue Item No field type is code.
Would you please help out.
Regards
Pushpraj
I'm trying to import xml file into Sales Invoice header & sales invoice Line i.e Table Sales header & Sales Line.
the xml file contains sales header & sales line, in sales line, Item No, Description & cross reference no is given.
If the Xml file does contain the Item No i.e "No." & its having Item Cross reference No, it should go Item Cross reference No and fetch the Item No. i.e my requirement.
but the probem is that Xml file contains Item No. = 0 (integer 0) & if try to import that file, it is not reading the last line of xml file which contain Item No. =0.
here is the code written on
No - Import::OnAfterAssignField()
IF "<Sales Invoice Line>"."No." =format(0) THEN BEGIN
CrossReference.SETRANGE("Cross-Reference No.",Cross_Reference_No);
IF CrossReference.FINDFIRST THEN
"<Sales Invoice Line>"."No." :=CrossReference."Item No.";
end;
I'm not getting any clue how to read the sales line of xml file whihc contains Item No is equal to 0(zero), becasue Item No field type is code.
Would you please help out.
Regards
Pushpraj
Regards
Pushpraj
Pushpraj
0
Comments
-
Instead of bringing in the value to the sales line field, assign it to a variable instead.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 250 Dynamics CRM
- 102 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions