Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Upgrade from NAV 2009 to NAV 2015 rename user id step

$
0
0
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.

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>