Post
Salesforce
What is force recorddata please explain it whit example?
Posted on 28th March 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);
STILL GOT QUERIES?