First of all, let’s describe the default behavior the AX kernel takes when a cross company query is issued. Here is an example of a cross company query:
static void CrossCompanyTest(Args _args)
{
Address address;
container conCompanies = [ 'a0', 'a1', 'dat' ];
;
while select
crossCompany :conCompanies address
order by dataAreaId
return;
}
Cross company queries in Dynamics AX 2009 will include an IN list of DATAAREAIDs:
SELECT …
FROM ADDRESS A
WHERE A.DATAAREAID IN (?,?,?)
ORDER BY A.DATAAREAID
static void CrossCompanyTest(Args _args)
{
Address address;
container conCompanies = [ 'a0', 'a1', 'dat' ];
;
while select
crossCompany :conCompanies address
order by dataAreaId
return;
}
Cross company queries in Dynamics AX 2009 will include an IN list of DATAAREAIDs:
SELECT …
FROM ADDRESS A
WHERE A.DATAAREAID IN (?,?,?)
ORDER BY A.DATAAREAID