In this blog post, I will show you how to create a View from the static query in D365FnO
In the previous blog post, we have discussed about AOT Static Query. In this post we will discuss about the View.
A View is a virtual table that displays data from one or more tables based on a query. A View can be useful for filtering, sorting, grouping, or aggregating data without modifying the underlying tables.
To create a View from the query in D365FnO, you need to follow these steps:
1. Open Visual Studio and connect to your development environment (Model).
2. In the Solution Explorer, right-click the project and select Add > New Item.

3. In the Add New Item dialog box, select Dynamics 365 Items > Data Model > View and enter a name for the View.
4. Click Add to create the View.

5. In the View Designer, right-click on the CustPaymMatchingInq view and go to the properties windows.
6. In the Properties window, set the Label of the view and select the Query from the property.
6. In the Properties window, set the Label of the view and select the Query from the property.

8. Expend the View Metadata node you can see the structure as we were defined in query. Drag and drop the required fields from the data source (CustTrans, CustSettlement) tables in the view Fields node.

10. Save your view and Build/Rebuild the project.
You can see the View data using browser option, see the following screenshot.

You have successfully created a View from the query in D365FnO. You can now use it in your forms, reports, or other components that require data access.
I hope this blog post was helpful and informative for you. Share with others and spread knowledge.