Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Blogs / DaxGeek / Reference Data Sources

Reference Data Sources

Reference data sources are data sources that are joined to the parent data source
through a surrogate key relation
- the RecId relation.
By adding the surrogate key field from the data source to the form design, the
Reference data source is automatically created, and the AutoIdentifcation field
group on the reference data source table is used instead of the surrogate key.



Modification from X++  

Use the query object to modify the query of a form data source. The query object
can be retrieved using either <name of data source>_Q or
FormDataSource.Query()
To make a permanent modification of the query, this is typically implemented in
FormDataSource.Init() after the call to super().
To filter records in a form perform the following steps.


1. In the ClassDeclaration, declare the relevant QueryBuildRange or
QueryFilter objects.


2. In FormDataSource.Init, initialize the range object.


3. In FormDataSource.ExecuteQuery, assign the actual values to the
ranges before call of super().


Manipulate the sorting of data by adding sortfields or an index to the data source
of the query. As an alternative, specify an index in the properties of the data
source.


Combine the sorting with some aggregated fields, which makes the data source
display aggregate information from the table instead of transactions. Perform the
following steps to show the sum of quantity of inventory transactions shown per
Item Id:


1. Group the data by item id using the addGroupByField on the
datasource.


2. Add Sum(Qty) as a SelectionField


Best Regards,
Hossein Karimi 

Comments

*This post is locked for comments