Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Dynamically linking tables for a form

$
0
0

Hi All

                   I have a requirement wherein I had to dynamically link a table recid with another table column as a foreign key relationship for displaying it in the form grid. I added the parent table(PurchTable) and the child table(GMD_Transactions) to the datasources of the form and wrote the following code to join them

queryBuildDatasource=PurchTable_ds.query().dataSourceTable(tableNum(PurchTable)).addDataSource(tableNum(GMD_Transactions));

       queryBuildDatasource.joinMode(JoinMode::OuterJoin);

       queryBuildDatasource.relations(false);

       queryBuildDatasource.addLink(fieldNum(GMD_Transactions, RowID),fieldNum(PurchTable, RecId));

But  it doesn't seems to work.Can someone enumerate the steps and as well as share some code. ?

Regards

Suresh


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>