1

We are using customer communities, at the moment we send 2 emails out to the new client(user). first one is up-on creation of the community user, salesforce sends out the welcome email with the generate password URL.

The second one we send out is a custom email through a custom button from a visualforce page by a back-office user.

We need to merge these two emails to one and send the email with the custom button click. Need to ignore sending salesforce generated "generate password" URL with the welocme email.

The problem is, how do we generate reset/generate password URL in APEX and copy that link to our custom email?

  • is this possible?
  • are there any alternatives?

NOTE: we do not want to use setPassword()

  • You can prevent email from salesforce easily by unchecking the Generate new password and notify user immediately checbox when creating the portal user, I am not too sure if the resetpassword method will let you reset password for a community user(hence not posting this an answer). Give it a try by creating a VF template and use a link to call the resetpassword method from the VF controller developer.salesforce.com/docs/atlas.en-us.api.meta/api/… – Rao Mar 8 '17 at 23:43
  • I know this doesn't answer the question, but what advantage does your custom reset password email give you? When a user clicks the link in the standard welcome email, she's prompted to set a password. – Doug Friedman Oct 31 '17 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.