Navision Expert opinions are needed, know how :)?

I have 2 companies in my Navision (2016), Company_1 & Company_2. Both companies are in the same Database!

Let’s say I create a new Purchase order in Company 1. Now, I want to send this Purchase order to Company 2 by pressing a button, this button will automatically send my Purchase order to Company 2 & create a new Sales order in Company 2 for me.

Now the question is how to achieve this without the inter-company Module in Navision? Is there another way to do this? I am A Navision programmer so I am open for some good & understandable ideas :slight_smile:

It is not possible to directly create document from one company to another. You need to write a program to pull the purchase order from company A to company B using ’ CHANGECOMAPNY’ function .
Look at the following links…/dd338929.aspx

Thanks a lot for your answer. I would say a web service would be much better? or what do you think?

Hey Zayed,

I believe it depends upon developers to developers and on their ease. Yes Web Service will be a better approach but the chances of error is comparatively more then using the CHANGEOMPANY feature.

For Webservice you have to design your code as per the Webservice guidelines and for CHANGECOMPANY there’s as in no Protocols to follow. You can simply go with the common C/AL code.

Good Luck. :slight_smile:

Generally then you should avoid using CHANGECOMPANY, unless for very simple “transactions”. So yes web-services would be much better.

But I think that it’s more interesting to know why you don’t want to use the functionality build for this? Why not use the inter-company module?

HI Erik,
First thanks a lot for your reply. We have in our new Navision System (2016) 7 different companies. The Purchase employee have to create a Purchase order in one company and create a Sales order in the other company and so one. We are using IC company in our old Nav 2009. But its really annoying sending an IC document and accepting it the whole day. we wanted to make the employees life much easier by just pressing one BUTTON & this button would create the other documents in the other companies.

And thats why I am asking what is the best way to do this?

I agree with Amol answer

Hi Imran,
Changecompany function will not be enough. The web service approach is much better in dealing with complex tasks :),

Hi Mohamed,
So have you designed the web service solution for this problem?

I followed this solution

Its really amazing, but the only problem is that I cannot use it to call a Code unit. Any idea how to over come this issue :)?


I thought it was easy to call web services in a codeunit. Please have a look in a manual, I had done it before but now its on top of my head.

not on type of my head*