Skip to main content
Hello 

How can I get the object name within an Aura Component based on the record.

Instead of having this while on the Account record:

<lightning:card>

<lightning:messages />

<table>

<th>

<lightning:recordForm

aura:id="accountRecordForm"

recordId="{!v.recordId}"

objectApiName="Account"

columns="2"

mode="readonly"

/>

I want to be able to have this no matter what objetc record I am on:

<lightning:card>

<lightning:messages />

<table>

<th>

<lightning:recordForm

aura:id="RecordForm"

recordId="{!v.recordId}"

objectApiName="Object API name based on record"

columns="2"

mode="readonly"

/>

Thank you,

P
답변 1개
0/9000