2 Companies and same table data

KisuKisu Member Posts: 381
Hey I've come up with this kind of a problem. I'd need to use same data in 2 companies, both companies are actually the same but they are on diffrent name because merging 2 companies takes time (like 6 monts+ depending of the size of the companies). Only thing they'd need is to have same item naming so they sell same products even they are separate companies at that point.
Is there a way to make base table that both companies use so the data shows up in both companies? the both companies will be under same SQL server and same same DB on it.

^^;;
K.S.

Comments

  • philippegirodphilippegirod Member Posts: 191
    2 Solutions :
    1/ Have only one table : change the property DataPerCompany = False on the property of the table. Be carefull, once data are in the table, it is impossible to change back this property.

    2/ Make a "replication tool" on the form : once an item have been created or when it is modified, transfer to the other company or modify in the other company the record. To do that you can use the CHANGECOMPANY(CompanyName) function (Rec, Miscellaneous, CHANGECOMPANY).

    I suggest you to use the second one...
    My candle burns by both ends, it will not last the night,
    But oh my foes and oh my friends, it gives a lovely light
  • KisuKisu Member Posts: 381
    Many thanks, this helped alot. :D
    K.S.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    2 Solutions :
    1/ Have only one table : change the property DataPerCompany = False on the property of the table. Be carefull, once data are in the table, it is impossible to change back this property.

    2/ Make a "replication tool" on the form : once an item have been created or when it is modified, transfer to the other company or modify in the other company the record. To do that you can use the CHANGECOMPANY(CompanyName) function (Rec, Miscellaneous, CHANGECOMPANY).

    I suggest you to use the second one...

    Just to add some more information.

    1/ (I also don't like option 1) but if you did go that route, be vary sure you understand that the Common to all companies table is a NEW table. Do Not just set that flag on an existing table, that will cause more problems than you can imagine.

    2/ Don't put the code on the Form, that is a big mistake. The code can go in a CodeUnit or on the Table, but the trigger for the code should be in the table.

    3/ My preferred method, is to create a new company say "Master Company" and in the Company table create a link between this and the sub companies. Then all Items are managed in this company, and the sub companies update items from this. The advantage is that you get more flexibility in design, and better control in usage. You can limit items to be only in certain companies, and control easily who can and can not update items masters through standard Navision security. (PS method 3 is an extension of 2)

    I have used all three, but in the future would only go for option 3.
    David Singleton
  • DenSterDenSter Member Posts: 8,305
    My preferred way is to create a new global copy of the table you want to expose across companies, and develop logic to copy records into the local tables.

    So for instance you wold have a new 'Global Item' table, which would be visible to all companies. Each individual company would not be able to insert regular Items anymore, but would only be able to copy a global item into the item table.

    Search for 'global item'. I'm sure that I've explained this many times :)
Sign In or Register to comment.