Ask Search:
123 21123 21 

Workflow on User Object

Adding a workflow for updating the Username field of User object to match with the change in Email address. 

Workflow Criteria:  ISCHANGED(Email) 

Field Update: Username (updated criteria: Username = Email)

The workflow is not executing when the Email is changed. When checked in the logs, the formula returns a false value and the update does not occur

Best Answer chosen by 123 21

All Answers

Jake BrushaferJake Brushafer
Hold on a min.  What are you trying to do here?  What's the business case? If you are making a new user you should just create a new user and deactivate the old one. 
123 21123 21
Nope, the use case is: We have portal users who change their email address. We wanted that changed email address to automatically update the username in Salesforce.

I am not creating new users but just trying to update the username field based on change in email address field
Mayank SrivastavaMayank Srivastava
HK, is this workflow supposed to fire when the user clicks on the email address change confirmation link that they receive in their Email and the Email then changes on the user record?
123 21123 21
Hi Mayank,

Yes, that is when I wanted the workflow to fire. When the user clicks on email, it changes the email field which inturn should trigger the update of username field.
Mayank SrivastavaMayank Srivastava
This was selected as the best answer
123 21123 21
Ahh..Got it.
Trying if this works Email<> Username and update Username based on Time Dependent Action. Do you think even that will have the same limitation? 
Mayank SrivastavaMayank Srivastava
It most likely will. No matter which workflow type you use , immediate or time based, both only fire on a create or edit on the record and since salesforce doesn't consider email change to be a DML, the workflow rule wouldn't get triggered at all.
123 21123 21
Got it. Thanks Mayank