You need to sign in to do that
Don't have an account?

flow's wrapped in lightning component finish behavior return to home
I am working on a flow wrapped in a lightning component as a global action and i am trying to figure out how to change the finish bahavior so the user is redirected to the home page. I came across these events ( force:navigateToObjectHome or force:navigateToUrl.) but I'm not sure where to used them in my lightning component. Any help with this would be greatly appreciated. My code is below for my component
Component:
Controller:
Component:
<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickActionWithoutHeader" access="global" > <aura:handler name="init" value="{!this}" action="{!c.init}" /> <lightning:flow aura:id="flowData" /> </aura:component>
Controller:
({ init : function (component) { // Find the component whose aura:id is "flowData" var flow = component.find("flowData"); // In that component, start your flow. Reference the flow’s Unique Name. flow.startFlow("New_IT_Support_Case"); }, })
Please find the answer to your question in below link:
https://developer.salesforce.com/docs/atlas.en-us.216.0.salesforce_vpm_guide.meta/salesforce_vpm_guide/components_using_flow_onfinish.htm
Thanks
lkatney,
I tried using the code from that example.
Component:
And I added this to the Controller:
When I save the component I get the following error below.
Do i need to customize some of the code to the name of my flow? I'm not sure what to do with that code.