Salesforce Fact #957 | Password reset of new user using apex

For new users, we can use the System.setPassword() method to set a password and while logging in they would be prompted to set a new password as per the standard salesforce behavior.

However, clicking on cancel would bypass that and would login to the org. This is helpful while creating multiple test users in bulk and to have same password for all instead of manually setting it for each user.

Reference: https://salesforce.stackexchange.com/questions/83345/how-do-i-create-a-user-without-asking-them-to-set-their-password

Comments

  1. Very informative post! The explanation about password reset of a new user using Apex is helpful for Salesforce admins and developers. It’s great to see how Apex can automate such essential security tasks. For those managing multiple platforms, it’s also beneficial to know how to migrate data from Salesforce to Zoho CRM for smoother user and data management. Thanks for sharing this useful Salesforce fact!

    ReplyDelete

Post a Comment

Popular posts from this blog

Salesforce Fact #913 | Access selected record field values in screen flow lookup w/o Get Records