Newer Version Available
Considerations and Limitations
During the developer preview, you can only use Lightning Data Service in a Developer Edition org. You can’t package or deploy code that uses Lightning Data Service.
During the developer preview Lightning Data Service is accessed using the force:recordPreview tag. This tag name is temporary, and will change in the future. And, although it’s not planned, we reserve the right to make other backwards-incompatible changes with Lightning Data Service.
Lightning Data Service is only available in Lightning Experience and Salesforce1. Using Lightning Data Service in other containers, such as Lightning Components for Visualforce, Lightning Out, or Communities isn’t supported. This is true even if these containers are accessed inside Lightning Experience or Salesforce1, for example, a Visualforce page added to Lightning Experience.
Lightning Data Service supports primitive DML operations. That is, create, read, update, and delete (or CRUD). It operates on one record at a time, which you retrieve or modify using the record ID. There’s currently no support for relationship traversal, working with collections of records, or for querying for a record by anything other than the record ID. If you need to support higher-level operations, or multiple operations in one transaction, you’ll need to use standard @AuraEnabled Apex methods.
Lightning Data Service shared data storage provides notifications to all components that use a record, whenever any component changes that record. It doesn’t notify components if that record is changed on the server, for example, if someone else modifies it. Records changed on the server aren’t updated locally until they’re reloaded.