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
Rupesh YangalreddyRupesh Yangalreddy 

I am getting the there no attribute name when i am using the force record data and i totally understand what is the issue

<lightning:card title="New  Opportunity">
    <aura:attribute name="record" type="Object" />
<aura:attribute name="simpleRecord" type="Object" />
<aura:attribute name="recordError" type="String" />
<force:recordData aura:id="recordEditor"
    layoutType="FULL"
    recordId="{!v.recordId}"
    targetError="{!v.recordError}"
    targetRecord="{!v.record}"
    targetFields ="{!v.simpleRecord}"
    mode="EDIT" />
    </lightning:card>
Best Answer chosen by Rupesh Yangalreddy
Raj VakatiRaj Vakati
Spend a good amount of time to find the reason. The issue is because you are trying to keep the attributes in the lightning:card

MOve your attributes out from the lightning card and try 


 

 <aura:attribute name="record" type="Object" /> <aura:attribute name="simpleRecord" type="Object" /> <aura:attribute name="recordError" type="String" />

<lightning:card title="New  Opportunity">
   
<force:recordData aura:id="recordEditor"
    layoutType="FULL"
    recordId="{!v.recordId}"
    targetError="{!v.recordError}"
    targetRecord="{!v.record}"
    targetFields ="{!v.simpleRecord}"
    mode="EDIT" />
    </lightning:card>