Anyone who has worked on Screen flow specifically for cross object flows knows that Salesforce default functionality does not redirect users from flow to the created or updated record. Therefore the user will require to manually search for that created/updated record and look for that created record to view the details. This is not the ideal user experience that your user would want especially in fast-moving environments. It can impact your user’s productivity as well as increase the probability of human errors.
In this tutorial, we will look at how you can write a very simple lightning component and reuse that for all flows in your org to redirect the user to the record page after they finish the flow. No apex class/controller is used for this component so no test class is required either.
Let’s start with creating a Simple cross object flow first as shown below

Get Account Record

Add following fields on the screen component
Subject
Name

Add Create record component
Add field value within component as shown in the screen shot below

Create new lightning component from developer console


Add following code to your component
Make sure to include ” lightning:availableForFlowScreens ” class as implements (Highlighted in the screenshot below)to make this component available for flow.
Component
<aura:component implements="lightning:availableForFlowScreens" access="global" >
<aura:attribute name="recId" type="String" />
<aura:handler name="init" value="{!this}" action="{!c.init}" />
</aura:component>

Controller
({
init : function(component, event, helper) {
$A.get("e.force:navigateToSObject").setParams({
"recordId": component.get("v.recId"),
"slideDevName": "related"
}).fire();
}
})

Design
<design:component>
<design:attribute name="recId" label="Id of the record" />
</design:component>

Modify screen flow to include flow redirect component
Make following changes to the previously created flow to include this lightning component and navigate user to the created record
1.Modify “Create record” on flow to store record id of newly created case
Create new text variable called “NewCaseId” and check the checkbox to make that available for output


2. Add new Screen component on the flow
Insert new screen component after create record on the flow. And pass NewCaseId to the lightning component for the redirect as shown in the screenshot below

3. Save and Activate the Flow

User will now be automatically redirected/Navigated to the created record after flow finish creating the record.
For more Tips and tricks like this please click here or Flow Menu item. Follow my YouTube channel for more videos on this topic.
Thanks this is exactly what I’m trying to do. My use case is I’m using a screen flow launched from an existing activated Order that contains hardware products, so that the user can create a return order with negative quantity and no need for an Oppty or CPQ quote.
We got the standalone RMA order working but as you called out the user just gets sent to the source order that they created the RMA order from, not the created record.
Seems like a miss that this has not been added as an OOB flow action
Thanks for letting me know. Glad that worked for you!
Hi … it doesnt work for me because I´m invoking the flow from the Global Action. Is it possible to close the Global Action “popup” and then redirect ?