Propagate Items between companies in the same database

JosetxoJosetxo Member Posts: 92
Hello,

We have several companies (A, B, and C) in the same NAV database. We are in SQL, NAV 4.0.

We would like to propagate an item's No., standard cost and a few more fileds from the master company (A) to a chosen company (B or C, or both).

We'd like to do that form the item card.

Is it possible? I've thought about a text file or a table that would hold that information but, how canI make it visible to the other companies?

Thanks in advance,
Josetxo

Answers

  • kapamaroukapamarou Member Posts: 1,152
    a) Take a look at CHANGECOMPANY command and Data Per Company property of a table.
    b) Search this forum for these keywords.
  • jannestigjannestig Member Posts: 1,000
    You can do it by sharing the item table between the 3 companies by changing the property of the item company.

    It has been done several times but you will need to be careful in planning it espically if each company is in a different country and will have different costs and prices involved.

    If its all the same then you should be able to work it out
    look up "datapercompany" field property on the tables
  • David_SingletonDavid_Singleton Member Posts: 5,479
    jannestig wrote:
    You can do it by sharing the item table between the 3 companies by changing the property of the item company.

    It has been done several times but you will need to be careful in planning it espically if each company is in a different country and will have different costs and prices involved.

    If its all the same then you should be able to work it out
    look up "datapercompany" field property on the tables

    I would never recommend this method. There are so many dangers in this that it is just not worth the effort. I have had this request many times form clients, and in the end the best solution I have found is to replicate the item in each company. The code to do this is easily 1/10th of the code required to share the table. And with replicating the items the chance of a major bug are very minimal. Sharing the table is about 99% chance that it will at some stage in the future explode in a very big way.
    David Singleton
  • matttraxmatttrax Member Posts: 2,309
    As a customer who does have this (and other) tables shared across companies...don't.

    Write the code.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    matttrax wrote:
    As a customer who does have this (and other) tables shared across companies...don't.

    Write the code.


    You learnt the hard way did you? :wink:
    David Singleton
  • matttraxmatttrax Member Posts: 2,309
    It was that way when I came here, but I wish they had never done it. Granted it's not as bad as it could be. We don't have someone change an item/customer/vendor in company A and then someone complain in company B.

    But they didn't share everything they should have and shared other things they shouldn't have. Default dimensions to name one.

    Running on SQL, the back-end is confusing. Instead of Company$Table all the shared stuff is just Table. You get to the point where you just remember what tables are shared when you do queries and reports, but it's annoying.

    Thankfully that mess will be no more once...I mean if...we upgrade.
  • JosetxoJosetxo Member Posts: 92
    Hello,

    I'll have a look at the propertiesyou mentioned, thank you.

    David Singleton, mattrax: thanks as well. You do not recommend sharing the Item table. I'm sure you have valid reasons for that but, how can I replicate the item via code instead? Where should I place it?

    Josetxo
  • Alex_ChowAlex_Chow Member Posts: 5,063
    Josetxo wrote:
    Hello,

    I'll have a look at the propertiesyou mentioned, thank you.

    David Singleton, mattrax: thanks as well. You do not recommend sharing the Item table. I'm sure you have valid reasons for that but, how can I replicate the item via code instead? Where should I place it?

    Josetxo

    Did you check the link I provided?
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Josetxo wrote:

    I'll have a look at the propertiesyou mentioned...
    NO please DO NOT look at that property.
    Josetxo wrote:
    ...how can I replicate the item via code instead?
    Look at the link Alex provided it shows where to start.
    David Singleton
  • JosetxoJosetxo Member Posts: 92
    So you recommend maintaining the tables separate, using the CHANGECOMPANY command. And running that batch process once a day to synchronize the items.
    Alex, our version is 4.0. The restrictions you are talking about in your post do not apply to our DB, do they?

    Thanks,
    Josetxo
  • Alex_ChowAlex_Chow Member Posts: 5,063
    Josetxo wrote:
    So you recommend maintaining the tables separate, using the CHANGECOMPANY command. And running that batch process once a day to synchronize the items.
    Alex, our version is 4.0. The restrictions you are talking about in your post do not apply to our DB, do they?

    Thanks,
    Josetxo

    They do.
  • garakgarak Member Posts: 3,263
    The same discussion was also here:

    viewtopic.php?f=23&t=32588

    so, make it like Alex wrote in his BLOG

    Regards
    Do you make it right, it works too!
  • David_SingletonDavid_Singleton Member Posts: 5,479
    garak wrote:
    The same discussion was also here:

    viewtopic.php?f=23&t=32588

    so, make it like Alex wrote in his BLOG

    Regards

    :whistle: :whistle: :whistle: :whistle:

    So you post a link that posts a link back to the blog that Alex originally linked to??????
    David Singleton
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Josetxo wrote:
    Alex, our version is 4.0. The restrictions you are talking about in your post do not apply to our DB, do they?

    Thanks,
    Josetxo

    Josexto,

    Alex's blog mentions average costing as ONE of many issues. In ALL versions of Navision back to 1.1 there are problems with sharing master tables. Just follow Alex's suggestion.
    David Singleton
  • JosetxoJosetxo Member Posts: 92
    Ok, I'll do it the way Alex suggests and let you know about the results.

    ******

    I did it the way you suggested (Alex and David) and it works great.

    Your help has been of a great value.

    Josetxo
Sign In or Register to comment.