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

AX 2012: How to change the automatic join on two form Datasources?

$
0
0

Hello all,

I am having an issue with datasource changes I need to make to the InventQuarantineParmReportFinished form in AX 2012. For reasons I won’t go into a query is not possible in this case so I am adding an additional form data source.

The primary table, InventQuarantineOrder, has two fields related to the InventDim table: InventDimIdQuarantine and InventDimId. Both relations are defined correctly on the table.

The automatic linking is using the InventDimIdQuarantine field to join the two tables when I want to use the InventDimId field.

I have tried adding the following code to the init method on the InventDim table but it makes no difference:

qbdsInventDim = this.query().dataSourceName("InventDim");

qbdsInventDim.linkFields("InventDimId", "InventDim");

What I need to do is change the field being used to join the two datasources. I can’t just add a new range because the automatic linking is in place as well. I have tried googling solutions but I haven’t had much luck. !  My grid displays values from both tables so leaving the JoinSource blank and overriding executeQuery seems to have strange issues.

Any help would be soooo appreciated! I have banged my head against this for hours 

Thanks!

Anna


Viewing all articles
Browse latest Browse all 72043

Trending Articles



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