Would resetting their password be an option? There is a reset user password quick action on the Employee object which you could call after your use has been create.
Thanks Alasdair, i am thinking about the user experience, if we reset their password they will probably:
- Try to login and fail
- Click on the Forgot password link
-Get the email and follow the instructions
- Finally login
It would be much better and 1 step instead of 4... I haven't used that quick action before but i will try it.
2 of 2 people found this helpful
If you need to expire an account, manipulate the InternalPwdDateTime field. Whether the user's account is expired is dependent on the password policy found in the Admin UI: Configure > Security Controls > Security and Session.
Hope this helps!
I see, so what you are saying is if i have expiry set to every 30 days, when i create the user if i set InternalPwdDateTime to the created date / current date MINUS 31 days from, it should expire them. I did that thank you! I am closer now but it seems to do something but not what i expected... It does not take me to the password reset page is just shows me this error.
You cannot login to the system now. Please contact your administrator. Additional information is available in the logs
Yeah - did notice that myself. We currently don't use the expiry feature as not many people are configured as users but IMO, it doesn't seem ideal; expiry blocks account and resetting a password changes the user's password which could be abused (or in my case, inadvertently lock out your account )
I'm not sure if you would be able to get your exact desired functionality, but may be able to get somewhere close by utilising the quick action AlasdairRobertson mentioned. Perhaps call that QA in a workflow directly or if you need a prompt, use a composite QA which first has a prompt for the usename/email parameters then call the reset password QA (you would have to have the username/email fields saved for this to work).