Usage of cross company keyword in AX

Hi,
In order to fetch the data from different companies use cross company keyword.

Example:
below code is used to fetch the data from custtable from all the three companies mentioned in the container.

static void crosscompanies(Args _args)
{
CustTable custTable;
container conCompanies = [‘dat’, ‘text’,’AXT’ ];
;

while select crosscompany : conCompanies * from custTable
//order by custgroup
{
info(strfmt(‘%1’,custTable.RecId));
}

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s