How it works...

The first part of this recipe was to create a query and then a view, based on that query. Although we can create views directly, creating a query first allows greater control. For simple views like this, there isn't an obvious benefit, and it is acceptable to just add the tables manually to the view. When we start adding more levels to the view, or if we wish to perform aggregations on child records, the queries become a necessity. When adding data sources manually to views, there can only be one data source per level. This results in some deep levels in the data source tree view and relations that are not all intuitive.

When a view is built from a query, changes that are made to the query will affect the view. This is why ...

Get Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.