I have a cross-company property ("Yes") enabled query.,even though query returns values for the current company in Dynamics 365 (AX7)
I even tried with changecompany()
but there is no data for any other companies apart from current company.
_query.allowCrossCompany(true);
qr=new QueryRun(_query);
while(qr.next())
{
companyInfo =qr.get(tableNum(CompanyInfo));
info(strfmt("%1",companyInfo .DataArea));
}
here query is cross company query but still it showing the values for current company only(ie, if I run this code from USA dataarea shows only USA not other companies)