Tuesday, October 28, 2008

Crosscompany support in Dynamics AX 2009

This job shows how to retreive data from multiple companies using the crossCompany keyword in the select statement.

Here, we are specifying the container to restrict the number of companies to retreive the record from.

static void JobCrossCompany(Args _args)
{
container conCompanies = [ 'mpr', 'mop' ];
CustTable custTable;
;
while select crossCompany : conCompanies custTable
{
print custTable.name;
}
pause;
}

No comments:

Post a Comment