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

Cross company clause is not working correctly

$
0
0

I have two tables named Table1 and Table2, Table1 has one to one link with the salesLine table. and Table2 has child table of Table1 (inner join). I have a requirement to show data only from two companies (C1 and C3) rather than all (C1,C2,C3,C4,C5). When I tried following query, I received data from C1, C3 and C4) companies.

Here is the query:

container conCompanies = [ 'C1', 'C3''];

 

while select  crossCompany : conCompanies *  from        Table1

join Table2 where Table2.Table1RecId == Table1.RecId

{

salesline = salesline::findInventTransId(Table1.InventTransId);

insert the salesLine records in new table Table3.

}

Whats wrong with this code, why this code is inserting records for Company C4 as its not included in the conCompanies container.

Regards,

-Afsar

 

 


Viewing all articles
Browse latest Browse all 72043

Trending Articles



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