0

In lead object I have a lookup called Project_Name__c. How can I get the Id of the field in Javascript instead of value.

CMP

<aura:attribute name="mainleadRec" type="Lead" />

JS

var projName1 = component.get("v.mainleadRec.Project_Name__c");

1 Answer 1

2

Use aura:event to get the Id value. Fire an event when clicked on a record and send Id value using event's aura:attribute.

<!--c:compEvent-->
<aura:event type="COMPONENT">
    <!-- pass context of where the event was fired to the handler. -->
    <aura:attribute name="context" type="String"/>
</aura:event>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .