Accessing Multiple Companies

roshandilruk
roshandilruk Member Posts: 51
edited 2005-12-10 in Navision Attain
Hi..

If I have 2 companies in My DB, if I log in to one Company and if I need to get some data from the other company, is it possible to do? if possible how?

I need a direct method, not like using data ports.

can somebody advice on this?

Thx
Roshan

Comments

  • rvduuren
    rvduuren Member Posts: 92
    Hello Roshan,

    You can use CHANGECOMPANY. Example: You are currently in Company A and want a record set of Customers from Company B, here's how it works:
    Cust.CHANGECOMPANY('B')
    IF Cust.FIND('-') THEN
      REPEAT
        MESSAGE(Cust.Name);
      UNTIL Cust.NEXT=0;
    
    * But remember you only do a CHANGECOMPANY for table Cust. all related data flowfields, tablerelation, etc. of table Cust will point out to Company A.
    Met vriendelijke groet, best regards,

    Rvduuren