Показать сообщение отдельно
Старый 28.08.2008, 15:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
msdynamicsax: selecting data from multiple companyaccounts
Источник: http://msdynamicsax.wordpress.com/20...mpanyaccounts/
==============


Some of you might have heard about the new reserved word in x++ called crossCompany. It enables you to select data across multiple companies in Ax without the use of changecompany (which I hated)

Anyway, this is an example of how it works:

static void getTotalLineAmount(Args _args)
{
    SalesLine       salesLine;
    container       companies = ['dmo', 'dm2', 'dm3']; // specify the companyaccounts to select from
    ;
    select crossCompany : companies sum(LineAmount) from salesLine;
   
    info (num2str(salesLine.LineAmount,0,2,1,2));
}





Источник: http://msdynamicsax.wordpress.com/20...mpanyaccounts/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.