Launching an object from outside Navision 3.60

I need to figure out a good way to cause a codeunit to be run from outside of Navision. I am developing a web-based WMS that will integrate with Navision 3.60. I will have a need to cause Navision to do certain things like: 1) Post receiving on a PO 2) Process an inventory adjustment 3) Post shipping and invoice a sales order I will be using custom tables in Navision to place the data that the update process needs. For example, there will be a custom table for a purchase order which the WMS will use to update the PO line number and the qty received. The custom codeunit will be fired when the WMS is done receiving the order. The codeunit will update the actual PO lines and then post the receiving. This can be done by a timer-based form but that has several drawbacks including: 1) It has to be run somewhere by someone and will not run as a service or start automatically. 2) It could be run more than once, creating problems 3) It will not run on demand, and stay idle while not needed 4) All the processes would probably have to be done in the same timer-based form so there would only be 1 form that has to be running all the time. I would prefer to be able to execute a certain codeunit when necessary from outside of Navision. There would be no need to pass data except through the database itself. (We use the SQL version so that is easy). Does anyone have any ideas on how to do this? Or ideas to make the timer-based form method more reliable and robust? Thanks in advance,

I would definately recommend looking at Navision application server (NAS).

I have heard that the Navision Application Server can do this. Can anyone explain how I would tell the NAS to do this from my web application (written in Cold Fusion)? I’m not sure about the pricing of this solution. Would it be overkill for what I need to do?

As I understand it the basic idea of the NAS is a GUI-less Navision Client that runs as a service (therefore starts automatically). On the start up on the NAS you can put any start-up code which usually involves invoking an instance some sort of “listener” COM component that listens to some common message area (Message Queue or Named Pipe etc…). Then your application can put messages (or data in the form of XML) in the Queue and the same part of Navision that starts the NAS will catch an event from the COM component passing the message. Some basic COM components package with Navision - and more complicated ones (with XML translation codeunits) come with the Commerce Portal package. I have thought about calling a COM component directly but the challenge is to get your external application to reference the same instance of the COM component as the NAS created. I know it is possible to pass around instances (I did it in VB a long time ago) but can not remember how. If anyone can help me here - that would be appreciated. Thanks, Nikolai

You can start NAS with You own parameter. Take care of that parameter in Codeunit 1 and go wherever You wan’t from there. You could let the NAS watch some table with a work queue where You put You requests, or You can let NAS listen to a specific IP-port for a message since it suports sockets since 3.60.

Be careful when using NAS though. If your code contains anything that the users has to acknowledge it will crash. But if you use Message Or Error it will appear in the Event Viewer. You can modify the Startup of NAS in C/U 1 in the NASHandler function.

According to the costs: (in the Netherlands at least) the first instance of the NAS is for free. However I understood you will need to purchase named users for every application approching the NAS.

HI try → ExpandIT Launch Utility for Navision and Navision Financials/Attain you can download a trial-version at regards