C/Side to SQL Migration - specifying the corrected dates

rsaritzkyrsaritzky Member Posts: 469
edited 2014-03-07 in SQL General
Hi,

I'm converting a database from C/Side to SQL. The FieldCheck codeunit displays a form with the "Incorrect Values" table at the end, asking you if you wish to implement the recommended changes.

This database has quite a few date errors (almost 700), and NAV doesn't do a great job in suggesting the "correct" date - it just changes the year to 1754, e.g. 02/12/0008 is suggested to change to 02/12/1754 - but I'd like it to be 02/12/2008.

I can edit the form one record at a time, but what I'd like to do is ask the end-user to specify the date they want, and import that list into this page.

I can find the table and import the data, but I can't find where (or if) in the FieldCheck and related codeunits that I can tweak the code to just use the current contents of the Incorrect Values Table, skip the FieldCheck stuff and just apply the updates. The codeunit appears to purge the Incorrect Values table before starting (or use a temporary global to store the values and then save them at the end to the permanent table.)

Has anyone attempted to add functionality so this table can be reviewed at a later time and then implement the changes - without re-running the datecheck logic?

Thx

Ron
Ron

Comments

  • ara3nara3n Member Posts: 9,256
    I would copy it to excel and write a dataport to fix the data. Make sure you have all the columns necessary to update the correct table and record.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • rsaritzkyrsaritzky Member Posts: 469
    ara3n wrote:
    I would copy it to excel and write a dataport to fix the data. Make sure you have all the columns necessary to update the correct table and record.

    The dataport isn't the problem - there's no way currently to force the processing of that table. In the standard FieldCheck codeunit, the processing of the table happens when the form is closed. The form is run modally in the middle of a function (NextTable) that is called repeatedly. I've been unable to decipher how the function works to trigger the implementation of the changes. Once the form is closed, you can open the form directly, but not force the processing of changes.

    Ron
    Ron
  • ara3nara3n Member Posts: 9,256
    check the code on table that is used for the temp form.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • rsaritzkyrsaritzky Member Posts: 469
    ara3n wrote:
    check the code on table that is used for the temp form.
    There's no code in the form. The form is called from the codeunit (i.e. FORM.RUNMODAL) referencing a global record variable that is Temporary=Yes. But the records are stored in the permanent version of the table - not sure when they get placed there.

    Ron
    Ron
Sign In or Register to comment.