Quantcast
Channel: Martin Dráb's Activities
Viewing all articles
Browse latest Browse all 17532

Adding Link to datasources

$
0
0

Hi ,

I need to get the following structure:  ItemId(InventTable), BomId(BOMVersion), bomID(BOM), QTY(bom). 

I have created a query and i tested it in the job and it works fine, here is the job

q       = new Query();
    qbds1   = q.addDataSource(tablenum(inventTable));
    qbds1   = qbds1.addDataSource(tablenum(BOMVersion));
    qbds1.relations(true);

    //link bom to bomversion
    qbds2   = qbds1.addDataSource(tablenum(BOM));
    qbds2.relations(false);
    qbds2.addLink(fieldNum(BOM,BOMId),fieldNum(BOMVersion,BOMId));


I tried to apply the  same logic on my form based on inventtable_ds (grid1),bomversion_ds(grid2),  bom_ds, (grid3), 
to show those values in 3 separate grids. In BOMversion_ds execute query I added the following code refered to this post https://community.dynamics.com/ax/b/daxmusings/archive/2011/10/13/query-object-datasource-linking
but i didn't get the result only inventtable and bomversion are linked together.

BOM_ds.query().datasourceTable(tableNum(BOM)).relations(false);
BOM_ds.query().datasourceTable(tableNum(BOM)).addDataSource(tableNum(BOMVersion)).addLink(fieldNum(BOM,BOMId),fieldNum(BOMVersion,BOMId));

Any suggestion please? thanks.




Viewing all articles
Browse latest Browse all 17532

Trending Articles



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