Options

Upgrade from NAV 2009 to NAV 2015 rename user id step

jwilderjwilder Member Posts: 263
We are upgrading from NAV 2009 R2 to NAV 2016. In the upgrade toolkit for NAV 2015 there is a step that rename the user id's from JWILDER to DOMAIN\JWILDER (for example). Here is the code that runs to do this:

WITH TempWindowsLogin DO
IF FINDSET THEN BEGIN
LOCKTABLE;
REPEAT
User.SETRANGE("User Name","User Name");
IF NOT User.ISEMPTY THEN
UpgradeUserMgt.RenameUser("User ID","User Name");
UNTIL NEXT = 0;

DELETEALL;
END;

TempWindowsLogin are the Windows logins from the NAV 2009 R2 database. In my example there is a record for me that looks like this:
User ID UserName
JWILDER DOMAIN\JWILDER

The User table (User variable in code above which is table 2000000120 has the following corresponding record:
User Name
JWILDER

So the code is supposed to run through and rename my user (from JWILDER to DOMAIN\JWILDER) but it won't because
IF NOT User.ISEMPTY THEN is true. The reason for this is because User table has me as JWILDER and not DOMAIN\JWILDER.

So my question is who knows where along the way this table (2000000120) gets created and why is it populating me as JWILDER when it should be DOMAIN\JWILDER. Ifit has me in there as DOMAIN\JWILDER this would not be an issue.

Just mentioning as well that post upgrade when I create a new user it always creates them as DOMAIN\UserID. So all the old users are just UserID while the new users are DOMAIN\UserID.

Best Answer

Answers

  • Options
    jwilderjwilder Member Posts: 263
    Small update to focus in on the actual issue.

    In a prior step when converting to NAV 2013 that is where the new User table gets created and populated. This is part of the conversion to NAV 2013 (where you convert the database from NAV 2009 R2 to NAV 2013) and not something that we as developers have access to.

    When that User system table (2000000120) gets created it it is populating all of our users without the domain. This is where the issue is. It is supposed to be populating the users with the domain. Anyone come across this or know of a fix?

Sign In or Register to comment.