2 Companies and same table data

Kisu
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.
^^;;
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.
0
Comments
-
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 light0 -
Many thanks, this helped alot.K.S.0
-
philippegirod wrote: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 Singleton0 -
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 times0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions