Upgrade from NAV 2009 to NAV 2015 rename user id step
jwilder
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.
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.
Jason Wilder
jwilder@stonewallkitchen.com
jwilder@stonewallkitchen.com
0
Best Answer
-
Found a fix for this. Used the latest version of NAV 2013 (7.00.46576) for the conversion and it solved the problem. So the User table after the 2013 conversion has Domain\User in it now.Jason Wilder
jwilder@stonewallkitchen.com5
Answers
-
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?
Jason Wilder
jwilder@stonewallkitchen.com0 -
Found a fix for this. Used the latest version of NAV 2013 (7.00.46576) for the conversion and it solved the problem. So the User table after the 2013 conversion has Domain\User in it now.Jason Wilder
jwilder@stonewallkitchen.com5
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions