2

I know that the alias in User record is auto-populated. However, I would like to update this as the last name was entered incorrectly. It seems like Salesforce do not allow me to do so. How do I edit/update the alias in existing User Record?

2
  • 1
    Cheryl, you may want to specify whether this is by using the user interface or anything else. Sep 9, 2014 at 8:53
  • Yes, I'm trying to update the alias field from the page layout itself.
    – Cheryl
    Sep 9, 2014 at 9:06

2 Answers 2

2

I just tried it in a dev. org. and I was able to update the Alias field using the standard UI.

Go to Setup -> Users -> Select User -> Edit -> Enter Alias -> Save.

2
  • 1
    Thanks Davin! I finally found that there's an existing validation rule in my org that restrict me to update the field in the first place.
    – Cheryl
    Sep 9, 2014 at 9:32
  • Glad you got it sorted. Sep 9, 2014 at 9:33
0

Try :

User u = [SELECT Id, Alias FROM User WHERE ...]; // Get the user you want to update
u.Alias = 'MyNewAlias';
update u;

system.debug(u.Alias);

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .