Views:> Like a table, a view uses fields and rows to represent data records. However, the data in a view is not stored as a database object but is dynamically created when the view is accessed. A view uses a query to retrieve data fields from one or more database tables. >In Microsoft Dynamics AX, you can use views where you use tables. For example, you can use a view in a form, a report, and in X++ code. The following features shows the benefits of using a view instead of a table: 1. Focussed Data 2. Customized Data 3.Performance >When you create a view, the view definition is generated and stored in the database. When that view is accessed, the view dynamically retrieves the data that satisfies the view definition. >Views will help to see the data from multiple table fields in a single window[Table browser] >We cannot perform any DML operations on view [Create, update, delete, insert] >Only select query will get executed automatically when u open the view >Views are used on reports [extensively] and can also be used on forms >we cannot create any index or deleteactions on a view >we can never see the data in the view [ax OR FROM BACKEND] Because only select query will be triggered while opening the view View Elements: Views are located in the Application Object Tree (AOT) under the Data Dictionary\Views node. A view contains four primary nodes: Metadata : The Metadata node contains the query or data source that the view uses to retrieve data. A metadata query or data source is referred to as the view query. Fields : Phyisical columns you want in your views. Field Groups : Logical grouping of added physical columns. Methods : Methods on Views Example with complete steps :Before starting make sure you have created two table ie. SIB_CustTable and SIB_CustTrans (SIB here
stand for south Indian Bnk but offcourse you can have your own two tables only thing is follow the steps)
Go to AOT >> DataDictionary >> Views >> RC >> New view Name it as "SIB_CustomerView" and label as "Customer and transactions view" Expand the view and you wil find important node called 'MetaData" In the metadata - we need to add all the tables in the datasources node Drag and drop SIB_CustTable to the datasource node. Expand the newly created datasource node and you will find one more datasource node inside it/within it - drag and drop SIB_custTrans table under this. Right click on the newly created child datasource and set the relations property to "Yes" Go to fields node and drag some fields from first datasource and some fields from child/second data datasource >Finally Right click and open the view, you will find that all the linked records will be displayed in the view with no DML operations >The record id in the view will be always the parent datasource recid and recversion will be always 0 >You can use this view on the form, reports etc.
Hope this is helpful to u I think you will not find the steps which I gave on any microsoft training material, so cheers :)
Thursday, 13 February 2014
Views in Dynamics Ax with example and detail creation steps.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment