Skip to main content
2 of 2
added 107 characters in body
Anutej
  • 479
  • 3
  • 8

I have implemented force:hasRecordId and I was able to console log the case id can you check the code I used once:

Component:

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,flexipage:availableForAllPageTypes" access="global" >
    <aura:handler event="lightning:tabClosed" action="{! c.onTabClosed }"/> 
    Case Id is {!v.recordId}
</aura:component>

Controller:

({
    onTabClosed : function(component, event, helper) {
        var caseId= component.get("v.recordId")
        var tabId = event.getParam('tabId');
        console.log("Tab closed: " +tabId);
       console.log("Case Id:" + caseId);
    } 
})
Anutej
  • 479
  • 3
  • 8