Introduction to Microsoft Dynamics AX 2012 R3 Development-1

Microsoft Dynamics AX 2012 R3 Development-1

Locus IT ServicesMicrosoft Dynamics AX 2012 R3 Development-1

Lesson 3 : Joining Data Source

Join Data Sources for a Form:

Join Data Source details Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

This topic describes how to create a join relationship between two tables in the Data Sourcesnode of a form.

Instead of creating two forms for the species and breed tables, both tables could be placed on the same form, and joined together to make viewing and creating records simpler.

It is a form data which is the database query, table, or view that a form uses to retrieve the data that is displayed by the form. you also defines a connection to the Application Object Server (AOS) that the form can use to create, update, or delete database records. This section of the documentation describes how to use the Application Object Tree (AOT) to configure a form data source.

To Join DataSources as a Single DataSource

  1. In the AOT, expand the form, and then expand the Data Sourcesnode.
  2. Press CTRL-D to open a second AOT, expand Data Dictionary, and then expand Tables. The AOT lists the tables you can use as a form data source.
  3. To add tables to the form datasource, drag two tables and drop each table on the Data Sourcesnode of the form in the first AOT. The tables are added as data sources to the form.
  4. Identify the table you will use as the primary data source. The other table will be the secondary data source.
  5. Click the secondary data source, and set the JoinSource property to the name of the primary data source.
  6. Set the LinkType property of the secondary data source to InnerJoin, OuterJoin, ExistJoin, or NotExistJoin.
  7. Create the form design, and add controls that display fields from the joined data sources. Typically, you use a grid control to display the data from joined datasources.
  8. You might have to add code that updates data in shared fields. This step depends upon the design of your form and might not be required for all forms with joined datasources.For example, you create a join between two tables using Table1.Field1 and Table2.Field2. Since the fields are identical, only Table1.Field1 appears in the form. However, a change to Table1.Field1 on the form does not automatically update the value of Table2.Field2. To update Table2.Field2, add code to the modified method of Table1.Field1 that updates the value of Table2.Field2.
Locus IT Project Management Office
What’s it?