function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bluecapbluecap 

Set or Reset Portal User Password

Hello,

Im trying to reset a portal user password, but the button is not displaying on the portal user detail page. Mainly I just want to set the password for the portal user. Whats the best way to do this?  Thanks ahead of time!
AshlekhAshlekh
Hi,

You can run this query in developer console.
System.resetPassword('ID of user record ',true);
Setting the second parameter to false will stop the triggering of standard email.

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_system.htm

https://help.salesforce.com/apex/HTViewHelpDoc?id=resetting_and_expiring_passwords.htm

-Thanks
Ashlekh Gera