function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Phuc 2Phuc 2 

Aura component retrieve lookup field id

Hello All,
How can I retrieve the lookup field that is on the parent record in an aura componet.
implements="flexipage:availableForAllPageTypes,force:hasRecordId,force:hasSObjectName,lightning:actionOverride,force:lightningQuickAction,lightning:isUrlAddressable,lightning:hasPageReference"

So here I can get the recordId by:
recordId="{!v.recordId}"
But I need the look up field on the recordId.

Thank you,
P
 
Best Answer chosen by Phuc 2
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Phuc,

You cannot get directly the lookup like we get the recordid. You need to get the recordid and then pass that record id to apex controller and then query it in apex controller and again pass it to the aura.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,