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

RE: Problems building a query with the Query-Object-Framework in AX

$
0
0

You write X++ code generating SQL, but you don't bother to look at what you've generated. Trust me that it's extremely important - you would immediate see how your SQL differs from what you wanted to achieve.

addLink() accepts field IDs from the current and the parent datasource - that's InventTrans a InventTransOrigin in your case. Your attempt to use fieldNum(VendPackingSlipTrans, PackingSlipId) means that you create a link to a field in InventTransOrigin that has the same fieldId as VendPackingSlipTrans.PackingSlipId (which definitely isn't what you intend). It doesn't magically use a completely different datasource.

You should be able to achieve with the extended query syntax (if you want to do it all in code).

PS: Note that there was no reply when I started typing this one, so it doesn't take other replies into account.


Viewing all articles
Browse latest Browse all 175888

Trending Articles



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