• Sunil Dani 4
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,
I have written a lightning component and calling a flow from this. It works fine except there is one problem. I am able to pass the record id as a flow variable since that is the flow input variable but there is one more field inside the flow and the flow has a decision node based on that field. If i pass only the Id, the other field inside the flow doenst seem to get the field value even though the field from the same object.
If this is the case how can i pass other field value to the flow along with the id ?
Below are my component and controller: 
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
    <aura:attribute name="claim" type="Claim__c"/>
    <aura:attribute name="claimId" type="Id"/>
    <force:recordData aura:id="claimRecordLoader" recordId="{!v.recordId}" fields="Submit_to_TPA__c"
                      targetRecord="{!v.claim}" />
    <aura:handler name="init" value="{!this}" action="{!c.init}" />
    <lightning:flow aura:id="flowData"/>
</aura:component>
 
({
    init : function (component) {
        // Find the component whose aura:id is "flowData"
        var flow = component.find("flowData");
        var inputVariables = [
            {
                name : "ClaimIdVar",
                type : "SObject",
                value : { "Id" : component.get("v.recordId")}
                //value : component.get("v.recordId")
            }
        ];
        // In that component, start your flow. Reference the flow's Unique Name.
        flow.startFlow("SubmitToTPA", inputVariables );
    },
    
})