I would like your advice on the best way to achieve the required behavior Our process is the following.

  1. We get a new lead from one of the communication channels
  2. Our user communicates with the lead and asks for the Email.
  3. He then adds the email into the lead record
  4. An auto launched flow is triggered on edit that looks if a contact with this specific email address exists and auto-converts it automatically to the existing contact and create an opportunity related to this contact
  5. At the end of the flow we would like to redirect AUTOMATICALLY the guest to the opportunity just created

We are having trouble doing number 5! is there a way to do it out of the box ? using Apex?

thx you

1 Answer 1


There is no way to return anything from the record triggered flow. The best approach to this would probably be special component, either flow with lwc or completely lwc.

You need to move the part 3. to screen flow, then process 4. inside the flow and in the end of the flow call custom lwc action, in which will be the NavigationMixin which will take care of the redirect.

For the navigation, use this snippet.

            type: 'standard__recordPage',
            attributes: {
                recordId: 'id of newly created opp',
                actionName: 'view',
  • Thx you for your answer, I am moving forward with this... How should I use this Snippet? within a callback ?
    – Ben2pop
    Mar 16, 2022 at 14:05
  • It is described in the documentation I linked, together with this developer.salesforce.com/docs/component-library/documentation/…
    – Damecek
    Mar 16, 2022 at 14:57
  • In fact I managed to make it work but not with NavigationMixin.GenerateUrl but with NavigationMixin.Navigate All good ;)
    – Ben2pop
    Mar 16, 2022 at 15:32
  • Yeah, sry that was my bad, I updated the answer. If this helped pls accept this as an answer.
    – Damecek
    Mar 16, 2022 at 15:43
  • Accepted of course ;) thx you for guiding me through
    – Ben2pop
    Mar 17, 2022 at 8:18

You must log in to answer this question.

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