force:recordData
- Used to Create,Edit,Delete,View a Record
- To Perform Save,Delete Operation on record,controller methods Save Record or delete record
- It uses Attribute of object type in which set when record is loaded
- Need to use lightning:input to display data
- Need to specify save button to perform save operation
<force:recordData recordId="{!v.recordId}"
targetFields="{!v.simpleRecord}"
layoutType="FULL"/>
lightning:recordForm
- Used to Create, View, Edit And Update
- No Need to write any method in controller form will submit Automatically on clicking save button
- It doesnt need any attribute to store the record
- No Need to use tags to display , it Automatically generates the input fields
- No Need of any button it Automatically generates the button
<lightning:recordForm recordId="{!v.Id}"
objectApiName="Account"
layoutType="Full"/>