Copy Company information from one company to the other

pri_1_ranjanpri_1_ranjan Member Posts: 67
edited 2005-04-12 in Navision Attain
Can any body please tell me where i can get the objects for the information copying from one company information to the other

Thanks in advance
/PDR

Comments

  • Ian_piddigntonIan_piddignton Member Posts: 92
    Hi

    The functionality should be in the Setup Checklist in G/L Setup. On the Functions button in that screen is the copy data. It only works if the other comapny is in the same database and as standard a number of tables cannot be coppied. These include the Customer, Item and Vendor tables.

    Another way to do it would be to create dataports to export and reimport your data, there are no "standard" ones so you'd need to create your own.


    hope this helps

    regards

    Ian
  • KowaKowa Member Posts: 923
    Here is an example for copying the Item table to the new company :
    Create a report with a dataitem for table 27 "Item",
    an input field for the new company name in the request form and a record variable Item2 for the Item table.
    In the OnAfterGetRecord Trigger write :

    Item2.COPY(Item);
    Item2.CHANGECOMPANY(NewCompany);
    IF NOT Item2.INSERT(TRUE) THEN
    Item2.MODIFY(TRUE);

    Works similar for all other tables. Existing records will be overwritten.
    For the small tables with only a few records you can also use Cut&Paste. Open the database with two clients, one for the old company, one for the new one and just work your way through the tables in the object designer.
    Kai Kowalewski
Sign In or Register to comment.