Skip to main content

Notifications

Microsoft Dynamics SL forum

Change user name

Posted on by 70

 

We have only been using SL for about one year. One of our users got married, and of course we want to change the name in SL to reflect the new name.

 We have not been able to figure out how to get it working. Would have liked to just update the username in place. That did not seem to be possible. So we have now "deleted" the old account, and tried to add the new name (as associated with the active directory entry). Keep getting access denied.

Anyone already done something like this (seems like a common request - update username (windows ID) to reflect a name change)?

 

Example. login was nancysmith, now it will be nancyjones

 

Thanks

Lou

*This post is locked for comments

  • joe Profile Picture
    joe 935 on at
    Re: Re: Re: Change user name

     Ahh... I was thinking employee as in data within the system such as payroll etc.  So since they probably are an employee the app database may still need to be changed but for username purposes probably the Sys like Toni said, although I've never changed that.  If you used windows authentication you could just change it in active directory and SL would follow suit.

  • Toni Savage Profile Picture
    Toni Savage 260 on at
    Re: Re: Change user name

    I think you would need to do that on the SYSTEM database not the app one!

  • joe Profile Picture
    joe 935 on at
    Re: Change user name

    I've been through this scenerio and NexVue (www.nexvue.com) has a product called keychange that allows you to change employee IDs and more its pretty expensive though.  A couple years back before we purchased keychange I had this same problem and needed to change everyone's ID because we went from a name (jarvisj) approach to a number.  So here's how I tackled the problem:

    First I wanted to find all the SQL tables that had the field empid in it so I ran this query:

    declare @ColumnName as varchar(50)
    SET @ColumnName = 'empid'

    SELECT c.name as ColumnName, o.name as TableName FROM syscolumns as c
    JOIN sysobjects as o on c.id = o.id
    WHERE c.name like @ColumnName and o.xtype='u'

    This gave me a list of tables that contained EmpID.  So Next I created a series of queries to update the employee IDs from the old way (names) to the new way (numbers).  Here is the queries I used for one person. And with the help of excel i was able to mass produce queries  to do the entire company.

    update APTranDt SET empid='0000' WHERE empid='SMITH'
    update CalcChk SET empid='0000' WHERE empid='SMITH'
    update CalcChkDet SET empid='0000' WHERE empid='SMITH'
    update smWrkSvDetail SET empid='0000' WHERE empid='SMITH'
    update smEmpPhone SET empid='0000' WHERE empid='SMITH'
    update smEmpSchedule SET empid='0000' WHERE empid='SMITH'
    update smInvDetail SET empid='0000' WHERE empid='SMITH'
    update POAlloc SET empid='0000' WHERE empid='SMITH'
    update BenEmp SET empid='0000' WHERE empid='SMITH'
    update EarnDed SET empid='0000' WHERE empid='SMITH'
    update Employee SET empid='0000' WHERE empid='SMITH'
    update PRCheckTran SET empid='0000' WHERE empid='SMITH'
    update PRDoc SET empid='0000' WHERE empid='SMITH'
    update smServDetail SET empid='0000' WHERE empid='SMITH'
    update smServFault SET empid='0000' WHERE empid='SMITH'
    update PRTran SET empid='0000' WHERE empid='SMITH'
    update StubDetail SET empid='0000' WHERE empid='SMITH'
    update W2Federal SET empid='0000' WHERE empid='SMITH'
    update W2StateLocal SET empid='0000' WHERE empid='SMITH'
    update smSplCommDetail SET empid='0000' WHERE empid='SMITH'
    update WrkW2Form SET empid='0000' WHERE empid='SMITH'
    update smservhist SET empid='0000' WHERE empid='SMITH'
    update smVehOdom SET empid='0000' WHERE empid='SMITH'
    update W2EmpName SET empid='0000' WHERE empid='SMITH'
    update smWrkDetailInv SET empid='0000' WHERE empid='SMITH'
    update smWrkEmp SET empid='0000' WHERE empid='SMITH'

    Now as a disclaimer, I did this probably on Solomon version 5.  Plus we didn't have the entire solution implemented, so you could have different tables than we did.  Plus now there are different things such as Windows Authentication and things where I'm not sure how this would act.  If you do anything be sure to do it on a test database!  This is just to tell you how I did worked around this problem. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,782 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,067 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,150

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans