Skip to main content
2 of 2
added 642 characters in body; added 194 characters in body
Kris Goncalves
  • 22.8k
  • 8
  • 35
  • 72

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_load_record.htm

By implementing "force:hasRecordId", the component automatically inherits the record ID. You don't even need to explicitly have the "recordId" attribute named, although you can.

Looking at the example in the link, you really just do the following to load a record the aura component lives on. This is really just an exact copy of the example in the link. I noticed you're not using recordId in your component which I'd be interested in seeing if that's the culprit of the issues you're having.

<aura:attribute name="simpleRecord" type="Object"/>
<aura:attribute name="recordError" type="String"/>
 
<force:recordData aura:id="recordLoader"
    recordId="{!v.recordId}"
    targetFields="{!v.simpleRecord}"
    targetError="{!v.recordError}"
    recordUpdated="{!c.handleRecordUpdated}"
  />

You had some different variable names for targetFields, targetError, and recordUpdated but it seems you have the correct type set. The only issue I can see is what you're passing in the recordId

Kris Goncalves
  • 22.8k
  • 8
  • 35
  • 72