Salesforce: How do you change user's password with developer console?

As Salesforce dominating CRM market space, it has grown to support many industries and unique business requirements. Becoming an ecosystem that is so big to encompass every industry and companies of all sizes, the administration of Salesforce became very complex. The following list of Salesforce administative guides will help admins perform their daily duties and use as a reference for their administrative tasks.

Staff within an organizations come and go, and as an admin you may have to reset user's password for a number of reasons. Resetting a password within Salesforce will trigger an email to user's inbox, and the user will click on the link to reset their password. More often than not, an admin may need to reset user's password without triggering an email or user's acknowledgement. This is how you do it.

a. Login to Salesforce as an administrator.
b. Click your name -> Developer Console to launch a console window where you can run SOQL and Apex Codes.

Setup Menu

c. Click Debug -> Open Execute Anonymous Window.

Developer Console Menu

d. On the developer console window (Enter Apex Code), type the following command.

Change Password Command

User u = [SELECT Id FROM User WHERE username = 'u[email protected]'];
System.setPassword(u.Id, 'New Password');

e. Click Execute button.

Upon successful execution of the above Apex command, the user's Salesforce password will be changed to 'New Password'.

Tags: 

Comments

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.