Tuesday, June 26, 2018

Development with XMLPORT

XMLPORT is used for importing/exporting data from excel , text or XML in NAV.
What are the common requirement for XMLPORT by Client are listed below with ERRORS NAV Developer can face. So get ready to learn and explore.
Requirement 1. SKIP EXCEL Header.
This requirement is common while importing from Excel in NAV tables.
Solution.
Define a Boolean Field and write code as in Screen Shot.
 
Requirement 2.
Use OF EVALUATE Function to convert the Datatype.
Error 1.
Microsoft Dynamics NAV
---------------------------
Data at the root level is invalid. Line 1, position 1.
---------------------------
OK
---------------------------
Solution:

Error 2.
Microsoft Dynamics NAV
---------------------------
'', hexadecimal value 0x03, is an invalid character. Line 1, position 82.
---------------------------
OK
---------------------------
Solution :
Convert your Excel File to CSV Format.
 

Flow of Triggers in XMLPORT during Import of XMLPORT

OnInit
 
OnPre
 
OnAfterInit
 
Text Variable OnAfter Assign
 
OnBeforeInsert
 
OnAfterInsert
 
Root Import
 
OnPost Trigger

1 comment: