Skip to main content
3 of 3
Commonmark migration

Lightning component doesnot show the recordID

I am trying to show the classic URL in the Lightning page using the lightning component. But the record ID doesnt show up in the component. The component and controller is like below

Component

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
      <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
   
    This is the Classic URL of the record https://test.my.salesforce.com/{!v.myRecordID}   
    
</aura:component>

Controller

({
    doInit : function(cmp) {
        var xyz = cmp.get("v.recordId");
        cmp.set("v.myRecordID",xyz);
    }
})

When I try to add this component in the record page

enter image description here

Not sure what is missing here

user81642
  • 687
  • 5
  • 27
  • 59