2

Summary: I'm getting a "down for maintenance" error in my Lightning community when I click a custom button that launches a screen flow to create a user from an existing contact. The button works in Salesforce, but not the Lightning community.

Expected:

  1. User opens a Contact record.
  2. User clicks the "Create User" button.
  3. The button launches a screen flow to create the user and passes in the Contact.Id.
  4. The flow processes. If successful, the user clicks "Finish" and is redirected back to the Contact's record.

Actual:

  1. User opens a Contact record.
  2. User clicks the "Create User" button.
  3. A new tab opens with the force.com down for maintenance message:

Community-url is down for maintenance. Sorry for the inconvenience. We'll be back shortly. Please email us if you need to get in touch.

URL of the error page: community-url/flow/Create_Community_User?contact_id=0031h00000Ms2QE&retURL=community-url/0031h00000Ms2QE

Button Config:

/flow/Create_Community_User?contact_id={!Contact.Id}&retURL=community-url/{!Contact.Id}

Even if I simplify the button to just be /flow/Create_Community_User?contact_id={!Contact.Id}, I get the same error.

Also, I tried using the "Flow" component in the community instead, and that works when I pass in the correct IDs (so the flow itself seems to be working). I don't want to use the component because I still need a button or something to trigger this - I don't want the flow to trigger any time someone lands on a Contact's page.

Any ideas on why this is happening?

2

I FIGURED IT OUT

I couldn't use that button in lightning because it was passing in field parameters. Instead, I created a custom action on Contact that launched my flow. I made sure my Contact.Id variable was named "recordId," because SF requires this in order to pass in the ID while launching the flow (documentation). Works perfectly now.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.