I've just completed a few Lightning Component Trailhead modules and the last one discussed the Lightning Data Service which introduces <force:recordData ... />. For some examples, they use attributes such as fields, layoutType, targetFields, targetRecord, etc. After reviewing the Lightning Components documentation, I couldn't find a section on force:recordData.

I am hoping for explanations on the following attributes:

  • fields
  • layoutType
  • mode
  • recordId
  • recordUpdated
  • targetRecord
  • targetFields
  • targetError

On one module Lightning Data Service it mentions some of these are optional and can replace each other, but again the documentation is not straight forward on which ones replace one another, and their specific purpose.

Can anyone help clarify this confusion?

  • 1
    This is the documentation for force:recordData. I assume, this is what you are looking for. – Jayant Das Jul 5 '18 at 23:47
  • @JayantDas Thank you! I spent too much time on the older Salesforce documentation without realizing this updated page existed. – Salesforce_Noobie Jul 5 '18 at 23:54
  • I recently realized that the (old) documentation links are broken and that everything now exists there. Glad that it worked out for you. – Jayant Das Jul 5 '18 at 23:58
  • @JayantDas If you repost the answer as an official comment I will mark this as complete. Thanks again! – Salesforce_Noobie Jul 6 '18 at 17:11
  • I think you meant other way round (to post the comment as official answer) :) If that's what you meant then -- Done! – Jayant Das Jul 6 '18 at 17:14

The documentation you are looking for force:recordData can be found on the official documentation link as below:


Only recently realized that Salesforce has restructured the documentation links which still does not seem to be indexed and are not returned through a search.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.