Hi All,
I want to get item id for all the companies. How can I get different company records in Ax 4.0.
Please help,
Thanks,
Ragahv.
I found the solution. loop through 'DataArea' table and user changecompany() method. Under this loop through inventTable and fetch the records.
while select dataArea where dataarea.isVirtual == NoYes::No
{
changeCompany(dataArea.id)
i = 0;
inventTable = null;
while select inventTable where inventTable.ItemType == itemType::Service
info(strfmt("%1 %2 ",inventTable.ItemId,dataArea.id));
i++;
}
info(strfmt("%1", I));