• Deanne Walters 6
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I am try to do this (https://automationchampion.com/2019/04/16/getting-started-with-lightning-flow-designer-part-4-need-to-redirect-a-user-to-a-new-record/) where a flow will redirect to a newly created record. The only code changes I made where changing all of the references to LeadID to RecID.

When I am debugging it ends as follows:
C:FLOWREDIRECT (LOCAL ACTIONS): Flow_Redirect
Inputs:
recId = {!FinalContractId} (80056000000UeBaAAK)
Outputs:
recId (80056000000UeBaAAK)

However when I am actually doing the flow it redirects me back to the start of the flow.

Any advice on what is going on would be appreciated.

It is a Lightning Component and here is my code.

Component Code:
<aura:component implements="lightning:availableForFlowActions" access="global" >
<aura:attribute name="recId" type="String" access="global"/>
</aura:component>

Controller Code:
({
invoke : function(component, event, helper) {
var redirectToNewRecord = $A.get( "e.force:navigateToSObject" );

redirectToNewRecord.setParams({
"recordId": component.get( "v.recId" ),
"slideDevName": "detail"
});
redirectToNewRecord.fire();
}
})

Design Code:
<design:component>
<design:attribute name="recId" label="Id of the New Record" />
</design:component>
I am try to do this (https://automationchampion.com/2019/04/16/getting-started-with-lightning-flow-designer-part-4-need-to-redirect-a-user-to-a-new-record/) where a flow will redirect to a newly created record. The only code changes I made where changing all of the references to LeadID to RecID.

When I am debugging it ends as follows:
C:FLOWREDIRECT (LOCAL ACTIONS): Flow_Redirect
Inputs:
recId = {!FinalContractId} (80056000000UeBaAAK)
Outputs:
recId (80056000000UeBaAAK)

However when I am actually doing the flow it redirects me back to the start of the flow.

Any advice on what is going on would be appreciated.

It is a Lightning Component and here is my code.

Component Code:
<aura:component implements="lightning:availableForFlowActions" access="global" >
<aura:attribute name="recId" type="String" access="global"/>
</aura:component>

Controller Code:
({
invoke : function(component, event, helper) {
var redirectToNewRecord = $A.get( "e.force:navigateToSObject" );

redirectToNewRecord.setParams({
"recordId": component.get( "v.recId" ),
"slideDevName": "detail"
});
redirectToNewRecord.fire();
}
})

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