Newer Version Available
Lightning Data Service Example
Here’s a longer, more detailed example of using Lightning Data Service to create a
Quick Contact action panel.
Example
This example is intended to be added as a Lightning action on the account object.
Clicking the action’s button on the account layout opens a panel to create a new
contact.
This example is similar to the example provided in Configure Components for Record-Specific Actions. Compare the two examples to better understand the differences between using @AuraEnabled Apex controllers and using Lightning Data Service.
ldsQuickContact.cmp
ldsQuickContactController.js
ldsQuickContactHelper.js