Scenario:
We need to reset a password or change the password on an user utilizing a 3rd party app in salesforce. This user is there for the app only and not really a physical user in the instance. The email for this user is a person who has left the company or is on vacation but you need the app to work.
Solution:
You can do this 2 ways:
Go to Setup and Drop it down to Developer Console or sometimes called the System Log
Within the "Logs" tab you will see a button called "Execute".
Click on the text box or white space next to it.
It shall open up another window which is titled "Enter Apex Code"
Place in the following SOQL query:
User usr = [select Id from User where username='test@learn4sfdc.com'];
System.setPassword(usr.Id,'test1234');
Then click on Execute.
It should bring up a success window and you should be good to go.
Now you may need to log in and make sure everything is ok.
We need to reset a password or change the password on an user utilizing a 3rd party app in salesforce. This user is there for the app only and not really a physical user in the instance. The email for this user is a person who has left the company or is on vacation but you need the app to work.
Solution:
You can do this 2 ways:
- Change the Email of the user in question
- Click on Generate Password and click save.
Go to Setup and Drop it down to Developer Console or sometimes called the System Log
Within the "Logs" tab you will see a button called "Execute".
Click on the text box or white space next to it.
It shall open up another window which is titled "Enter Apex Code"
Place in the following SOQL query:
User usr = [select Id from User where username='test@learn4sfdc.com'];
System.setPassword(usr.Id,'test1234');
Then click on Execute.
It should bring up a success window and you should be good to go.
Now you may need to log in and make sure everything is ok.
No comments:
Post a Comment