Easy to work with many-to-one relationships in canvas apps for Common Data Service for Apps

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Working with relational data is key to most business applications. Yet it can be tedious to write queries that pull in the necessary information, join on foreign keys, and control the projection.

With this feature, it all becomes a lot easier for canvas app makers when they use Common Data Service (CDS) for Apps. For example, in the CDS for Apps standard model, there is an Account entity with a lookup for PrimaryContact that points to the Contacts entity. Let's say you need to display the last name of the primary contact in a gallery control. All you need to write is ThisItem.PrimaryContact.LastName. The Contacts data source doesn't even need to be loaded. PowerApps analyzes the app to determine which lookups are desired and to bring in only the fields that are required for the projection.