Duplicating Records Navision 3.60 dataport

I have written a dataport for my client. The source file for the import is 85 columns in length and is tab delimited. For some unknown reason, all records are being duplicated. I have ran debugger and watched Navision import a record and insert it, then reread the same record and insert it before moving on to the next record in the file. Could the number of columns be causing this? Any suggestions on what could be causing this?[xx(]

Do you have any code in it?

Yes see below: (I have all Autosave properties turned off) IF OldAccountString = AccountString THEN BEGIN “OCR Journal”.“Sabre 11 String” := ‘’; “OCR Journal”.“Sabre 5 String” := ‘’; END; OldAccountString := AccountString; Pos := STRPOS(AccountString,’ '); “Customer No.” := COPYSTR(AccountString,1,Pos-1); IF (“Customer No.” = ‘’) OR (“Customer No.” = ‘INTOUR’) THEN CurrDataport.SKIP; NextLineNbr += 10000; “Line No.” := NextLineNbr; “System Generated” := TRUE; IF “Customer No.” <> ‘AWS’ THEN “Customer No.” := “Customer No.” + ‘P’; INSERT;

Try using a global record variable and insert values in it instead of dataitem variable.

I did and it still replicates. It literaly reads each line of the file twice. For now I have added the following lines of code to only insert every other line: NbrRecsImported += 1; IF NbrRecsImported MOD 2 <> 0 THEN CurrDataport.SKIP;

I don’t know, in which trigger you have written the code, but delete the insert-command. Michael

As I was inserting the records manualy, doing that would mean the records would not be inserted. However, I restructed the dataport and now allow Navision to insert for me and removed the insert command. The results are the same duplicated records.