Error on specific record during dataport import

dallasdev50
Member Posts: 3
I have created a dataport to match the record to the customer no. and if it is a valid record to import. I want the dataport to fail if there is a record that contains an invalid customer no. Since the import will have a large quantity of records, I would like to return an error to the user that specifies which record in the tab delimited file is invalid.
Can somebody help me do this? It is most appreciated.
Can somebody help me do this? It is most appreciated.
0
Comments
-
Data in dataport is inserted line by line.
You can insert error message displaying the line no., customer no. or a unique record which you are importing.Regards,
Manish0 -
How would I enter a variable in the Error(Txt) in order to be able to display an identifier of the line in error to the users? I want to make it easy for them to identify which record in their file requires correction.
Thank you0 -
You need another variable to keep track of your line number. And the error message is like ERROR('Error on Line %1', LineNumberVariable)0
-
create a seperate textfile of all the errors that occured during import.
But you'll have to import your data into variables.
then something like..
if customer.get(variablecustno) then begin //map all the fields you need back to nav fields
"no." := variablecustomerno;
"name" := variablecustname;
etc etc
end else begin
ExportFile.WRITE("variablecustno");
CurrDataport.SKIP;
end;
Explained here : viewtopic.php?f=23&t=42493
mine might be the 8th post down0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions