Random issue when importing txtfile

BeliasBelias Member Posts: 2,998
I encountered this problem only in one report (nav 4sp3 sql).

this report import a text file and put it into a table "control panel", which contains also "operation occured date" field.

after importing the file, the user launch a process wich read this table and create purchase invoices.

There are a lot of controls on this procedure, e.g. "operation occured date" must be <> 0D.

sometimes, it happens that the user finds all the "created-by-process" invoices with operation occured date blank, but, after deleting them, reimporting the file and recreating the invoices, the date is correctly filled.
Why?!?! (while writing, i realized that the problem is not about the file importation, because the "control panel" table always have the "operation occured date" and the user can't create the invoices without this field filled) ](*,) ](*,)

thanks in advance
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog

Comments

  • kinekine Member Posts: 12,562
    1) Check, that all variables are cleared before importing next line. Sometimes it leads to "copying" values from previous lines when rec is not initilized in BeforeImportRecord trigger
    2) Check which input values are used and which can be cleared incorrectly when starting the import.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • BeliasBelias Member Posts: 2,998
    thanks 4 the reply,
    BTW, the file is imported correctly:
    quoting myself
    while writing, i realized that the problem is not about the file importation, because the "control panel" table always have the "operation occured date" and the user can't create the invoices without this field filled
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • kinekine Member Posts: 12,562
    Check, that there is no C/AL code in some OnValidate on the table which will clear this specific field. May be that in some cases validating something will delete something else. Or check another processes which can clear this field.

    Another way how to find more is to enable change log to track possible user intervention. If you are using SQL, you can use SQL Profiler to try catch the query which change this value...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • BeliasBelias Member Posts: 2,998
    ok thanks...it will be an hard research...
    and I couldn't manage to replicate the error on my db...(also my customer can't as it happens only some times)
    BTW...i'll write if I'll find the solution
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
Sign In or Register to comment.