Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

change user first name

(0) ShareShare
ReportReport
Posted on by 155

Our CRM online instance is tied to the Active Directory so the user details are getting pre-populated and hence are non-editable. Is there a way to change the users first name in CRM that can be done without a change in AD for example by code ?

This is required because I need to migrate the data from where the users first name is slightly different.

Thanks

  • LeoAlt Profile Picture
    LeoAlt 16,331 on at
    RE: change user first name

    Hi partner,

    Unfortunately, Office 365 will sync the user information to D365 10-30 mins everytime you edited the user information in Office 365 admin center. So I don't think it's a good idea to change the user name in D365, the best way is to change user name in Office admin center with global administartor permission.

    BTW, could you kindly share the reason why you want to change user name only in D365?

    Best Regards,

    Leo

  • bravoss Profile Picture
    bravoss 155 on at
    RE: change user first name

    Thanks, do you know if any changes made to the user first name in this way (only within CRM Application) and not in AD will continue to remain and AD will not try to re-sync and remove the update.

  • LeoAlt Profile Picture
    LeoAlt 16,331 on at
    RE: change user first name

    Hi partner,

    It is possible to update field value by code.

    You could use the following js code to do this.

    function updateFirstname(executionContext){

      var formContext=executionContext.getFormContext();

      formContext.getAttribute("firstname").setValue("Your value");

      formContext.data.entity.save();

    }

    You could also try an OOB way, clone or copy an entity from account with the same fields and then you could update the account by updating the new entity with workflows.

    Hope it helps.

    Best Regards,

    Leo

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

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... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans