Select from multiple companies

kovorka
kovorka Member Posts: 2
edited 2008-03-11 in Dynamics AX
:-k

Hi All,

I want to do a select statement from multiple companies from inside AX.
basically, I want to ignore the DataAreaId field for the tables I'm working
with.

I want to do this because I need to view information from all companies as a convenience thing for an administrator to approve things from all companies, instead of changing from one company to the other. This feature will ultimately be used in the Enterprise portal. Not sure if there's an easier way to do this...
Art, like morality, consists in drawing the line somewhere.
G. K. Chesterton

Comments

  • Harish
    Harish Member Posts: 172
    Hi,

    From Ax, changing companies is straight forward. Example -
    changeCompany(salesTable.interCompanyCompanyId)
        {
            purchLine = PurchLine::find(salesTable.interCompanyPurchId, salesLine.lineNum, true);
    
            if (purchLine)
            {
                purchLine.interCompanySkipUpdate = true;
                purchLine.delete();
            }
        }
    

    Does this help?

    Kind regards,
    Harish Mohanbabu
    Long way to go before I sleep..