s
sri kanth

Posted on 28th February 2024|361 views

0
votes

Force Recorddata Example Relationship Fields

What is force recorddata please explain it whit example?

Answers
P
Sowjanya Kodiganti

Posted on 28th February 2024

A force:recordData component determines the parameters as accessing, altering, or building a record utilising Lightning Data Service. To store a record, define its record ID, and the attributes of components, also a record of fields within your system component. Here is an example:

<force:recordData recordId="{!v.recordId}" targetFields="{!v.child}" fields="parent__r.foo__c" recordUpdated="{!c.init}" /> var child = cmp.get("v.child"); console.log(child.parent__c); console.log(child.parent__r.nid); console.log(child.parent__r.address); console.log(child.parent__r.foo__c);

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos