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?

4
  • I tried the same approach but the custom action on the community is not showing up only the custom buttons are .any insights why I am not able to add a custom action on my community page ? Oct 10, 2022 at 6:51
  • @sagarpunjabi I'm not totally sure, but I recently created a custom action that launches a flow, added it to the correct page layout, and it's showing in the experience cloud page for the site users, so it should be possible. Is it showing for admin users? That could help narrow down if it's a permissions issue.
    – Rochelle C
    Oct 17, 2022 at 18:10
  • @RochelleC Can you please mention the way you did it. I am working on a similar problem where I have to place a screen flow button in the community page and on click, the screen flow pops up with certain details. On completion the particular logged in community user's contact's account's checkbox field should be updated.
    – JK123
    Nov 14, 2022 at 12:00
  • @JK123 I would do this differently now. I'd probably just create a custom action on the object that launches the flow. You can still pass in the record Id if you add a recordId variable. Another option would be to create this as a screen flow and embed it on the record page. This would allow the user to choose if they want to create the user on the first screen instead. Nov 14, 2022 at 17:38

1 Answer 1

4

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .