Hi everybody!
I have a question about two companies on one database. I want to insert a table entry in one company out of the other company. Therefore I can use "table.changecompany(XYZ)" which works quite well. I only have a problem validating a field. Navision validates the field in the actual company. In my case I get the message "Customer No. doesn't exist", because the customer belongs to the other company and can't be validated for this reason. Did I miss something or does this just not work to validate in the other company?
We have company programmings as well which aren't correct because Navision checks the actual companyname and not the one of "table.companyname(XYZ)". Any hints about that?
I have already some ideas for a workaround but I wanted to make sure, that I didn't miss a simple thing.
Thanks!
Nicole
ProTAKT Projekte & Business Software AGMicrosoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt 0
Comments
You are right about the validation thing, it is always in the current company.
The are several solutions to this problem.
You can program code that does the validation with all the changecompany etc. This is quite complex and time consuming. Also this results in the maintanance problems mostly.
Easiest solution is to have a intercompany table in which to enter a record for a different company. You can have a NAS or a navision client loging in to the right company and finish the transacion.
I hope I've explained it correctly, otherwise, just ask.
thanks for your reply. I already thought about such a transfer table from which I can insert the data into the right tables after changing the company. Since there are only a few lines a month to be transferred I won't implement a NAS. I can trigger the functionally within the opening of the form. This shouldn't be any problem.
I just wanted to make sure that there isn't a simple coding similar to "changecompany" which I just don't know yet.
Thanks.
Nicole
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt
He wanted to "synchronize" items from one "master company" to several companies within the same database.
We decided to copy the data without field validate to the other companies.
Further more, we created for each company a log entry with the item no. and what action should be done (e. g.: Table 27, Field 18, WHERE (Field1=70000), Action::Validate).
For each company a job scheduler runs every 10 Minutes a report which proceed this log entries.
This works fine.
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
RIS Plus, LLC
One idea I have is to create a common table to keep the individual companies contacts in sync.
I am a little surprised that Navision has not addressed this area. One of the biggest problems companies have is having one central contact database.
http://mibuso.com/blogs/davidmachanick/
We usualy share the contact[5050] table and add the companyname to the key of the 5054 table. This does most of the trick.
Also remember to change the Synchronisation codeunits for customers/vendors etc and the Delete trigger of the 5050 table.