Data Migration RIM toolkit

ara3nara3n Member Posts: 9,256
Hello Just wanted to let you know of Data Migration issue that is happens in 5.01 sp1 as well as 2009.

btw this RIM import works out really well, so dataport do not need to be written if the doesn't need cleaning.

The issue is that the code converts everything to text as it imports the data from excel in CU 8611 and then calls CU 5302 "Outlook Synch. Type Conv" to convert it to the correct format.

We are going live with the client on 5 sp1, and I compared the CU to 2009 and there were a lot of fixes done to in CU 8611 Migration Management.
So I took both CU 8611 and 5302 exported them as text and imported them into 5 sp1 and removed code related to 3 tier CU.

After doing all this, there is still a bug in 5302 function TextToDate. It
TextToDate(InputText : Text[1024];VAR DateVar : Date;UseLocalTime : Boolean) IsConverted : Boolean
InputText := CONVERTSTR(InputText,' ',',');
IF STRPOS(InputText,',') = 0 THEN
  EXIT;

The code exits if it doesn't find a comma in the date. I don't understand why it should 1/08/2009 is a valid date.

I changed the code to
TextToDate(InputText : Text[1024];VAR DateVar : Date;UseLocalTime : Boolean) IsConverted : Boolean
InputText := CONVERTSTR(InputText,' ',',');
//Mod01 Start
IsConverted := EVALUATE(Day,InputText);
IF IsConverted THEN
  EXIT(IsConverted);
//Mod01 End

IF STRPOS(InputText,',') = 0 THEN
  EXIT;

This solved the problem with loading data using the data migration with fields that have Dates. Hope this will help ppl in future.
Ahmed Rashed Amini
Independent Consultant/Developer


blog: https://dynamicsuser.net/nav/b/ara3n

Comments

  • mgmmgm Member Posts: 126
    Rashed,

    Are you willing to share the downgraded objects?
    I found some bugs in using the Migration Overview form. Eg. when changing data in the Migration Errors form. It does not always apply these changes! Also when importing an integer value in a decimal fields: it doesn't import the value, and worse, no error is given. I changed some code in Codeunit 5302 to solve this. But still, the tool has some more bugs.
    I would be grateful if you can share your downgrade.

    Regards,

    Maarten
  • ara3nara3n Member Posts: 9,256
    Here are the objects.

    http://sites.google.com/site/ara3nfiles ... edirects=0


    Sorry had the wrong link.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • mgmmgm Member Posts: 126
    Thanx, Rashed!
    ;-)

    Maarten
  • ara3nara3n Member Posts: 9,256
    Did it solve the issues you had with migration?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • mgmmgm Member Posts: 126
    It's better but not solved.
    Integers are imported to decimal fields now.
    But when you want to import a decimal in an Integer field, the decimal is not shown in the form Migration Errors.
    When adding a field to a table, and putting a check mark to ex/import the field, the Migration tool gets confused: it reads the new field in the next record !?
  • jmccarthyjmccarthy Member Posts: 1
    I am thinking this is what caused my issue but I need to test it.
    I was importing dates for fixed asset depreciation books - it wasn't populating the date field (nor erroring out). I tried various text and date formats multiple & day/month/year formats although I didn't try comma's as the date separator.

    I would expect MS should post this info in their techknowledge database.
  • mgmmgm Member Posts: 126
    I think the Date and DateFormula bugs are solved in 2009.
    I downgraded some changes to 5.0 and also made some other changes to the Toolkit.
    But for the project we are doing now, I decided to switch to the old fashioned dataports.
    The advantage is that I can add extra validations: decide which table and field to validate first, solve the issue when importing items and creating Item UoM directly, etc. Also I can make program Data changes, eg. UoM 'PIECES' will be 'PCS' in the new system. In the Migration Toolkit you can change data, but you have to do it field by field and also the error flag won't disappear after changing a record.
    Also dataports are muuuuuuuch faster.
  • ara3nara3n Member Posts: 9,256
    yes for master data and for transactional data dataport or xmlport are the way to go. For Setup The RIM toolkit it nice since you can keep all your data in excel.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • AlexWileyAlexWiley Member Posts: 230
    We just ran into issues with the Mapping Tool in 4.0 SP2 and couldn't get the dates to come in correctly because it was using the date as a primary key and skipping records; we are going to be upgrading to NAV 2009 and they want to use the RIM toolkit but I am concerned after hearing of other people having date issues. I'm not sure if it complicates the issue more, but we use US dating in the SQL database and European dating in Navision.
  • ara3nara3n Member Posts: 9,256
    Apply the changes I've mentioned and do some test and you should be fine
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • NASiNASi Member Posts: 48
    Hi: I don't know if my question is related with this post.
    My question is that I'm working with NAV2009 SP1 ES and I'm creating some excel files with the migration tool in order to obtain the data from my customer in this excel file and then import on the new company that we are implementing.

    I did this with customers and vendors and with some new files (50000 ...) and it is working really good without doing dataports and so on.

    However I've encountered some 'bugs' like if fou have two fields like "PVL" and "%PVL" when the migration management gets the element name then gets two elements with the same name (always "PVL" because '%' is converted to ''). No matter with this, I've changed the name of the field (big problems big solutions).

    But the question that I don't know how solve is when I try to export an other new Table.
    When Creating Excel WorkSheet procedure is executed I get an error like 'This message is for C/AL Programmers ...' and Excel tells me something about 'Reference to file is not valid. The access route is not valid ...' (I'm translating because the message is from my Excel ES version).

    I've tried with the standard tables and with the 98 General Ledger Setup and 325 VAT Posting Setup I've got another error from Excel telling me that the expression of XPath that is not valid or something like that.

    I've found a HotFix in the Partner Source but I think that the version of this hotfix is very old.

    Can anybody help me?

    The Table that I'm trying to export is a simple table with this fileds:
    Field No. Field Name Data Type Length Description
    1 Nº licencia importación Code 20
    2 Cód. producto Code 20
    3 Tipo licencia Option
    4 Cantidad máxima Decimal
    5 Fecha inicial Date
    6 Fecha final Date
    7 Fecha creación Date
    8 Fecha modificación Date
    9 Nos. serie Code 10
    10 Cantidad pdte. pedidos Decimal
    11 Cantidad comprada Decimal
    12 Pedido compra Code 20
    13 Línea pedido compra Integer
    20 ID usuario Code 10
    21 Comentario Boolean
    22 Unidad medida Code 10
    23 Descripción producto Text 50

    and only the fields 1 to 7 are included to export/import.

    Thanks a lot!!
    Thanks a lot.
Sign In or Register to comment.