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:
- User opens a Contact record.
- User clicks the "Create User" button.
- The button launches a screen flow to create the user and passes in the Contact.Id.
- The flow processes. If successful, the user clicks "Finish" and is redirected back to the Contact's record.
Actual:
- User opens a Contact record.
- User clicks the "Create User" button.
- 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?