Integration DLL & OCX with NAVISION

Hi all, Is it possible to call DLL files (created from .NET) from navision. Whether is it possible to pass parameters from navision to any of the functions written in the DLL . Also, How to make use of custom controls(OCX Like kodak,Image editor) in navision form. I have successfully registered and created global variable. but it was not able to make use of it during the design and runtime. How to proceed after that. Thanks in advance, Regards, Anand

The following is taken from the Application Designer’s Guide PDF-Manual. This document (w1w1adg.pdf) can be found on the Doc folder of you Product-CD. In Chapter 16 “Extending C/AL”, you will find the following explanation:


16.2 USING COM TECHNOLOGIES IN C/SIDE C/SIDE supports COM technologies in two ways: using custom controls (OCXs) and as an automation controller. This support has a few limitations: Only non-visual controls are supported. This means that a control cannot be used to add graphical elements to a C/SIDE object (you cannot, for example, add a third-party control to a form). The control can, however, display information and interact with the user in a window of its own. Exception handling. C/SIDE does not allow the retrieval of information about exceptions from a control or automation server through the Invoke method of the IDispatch interface and the EXCEPINFO structure (as described, for example, in Inside OLE). The samples in the C/OCX Samples – the control and the C/SIDE application that uses it – show a way to work around this limitation. You can find a description on page 332.

Read through this chapter and you will gain good insight. It even includes a few examples with Word and Excel.

Hi nelson, We are at the moment evaluating Navision and therefore I am completely new to the topic. But if your posting is correct for the current version of Navsion, then I am very confused. If you look in the download section of, you find commercial addon. At least one of it (embedded controls) claims to ad a charting ocx to Navision. So does your quote from the manual say, it is not possible or it is not supported? Or it was not supported in the past? Can somebody clarify this?

That’s related to the first limitation “Only non-visual controls are supported”. You can use COM to automate tasks with, for example, Microsoft Office Applications. You can’t however use visual OCX controls like Charts in Navision. This hasn’t changed, it’s always been like this. The sample you saw doesn’t really use the Chart inside Navision. The Chart stands on it’s own window which floats above a form in Navision. This is a very smart workaround that effectively makes it look like Navision has a Chart. If I remember properly, the sample is from a company where Jan-Pieter - a forum member - works. I hope this helps you understand both the quote from the manual and the Embedded Controls demo.

.NET Assemblies cannot be called directly from Navision as far as I know. I’m using .NET applications which communicate via TCP/IP sockets with Navision. If anyone has a better idea: just tell me.

Hi anand, My understanding is that Navision is based on COM and can use dlls and OCXs that are COM servers. A .NET dll is not a COM object. If you are creating the .Net dll youself there is a very easy procedure to put a COM wrapper around your .NET dll. I don’t know how easy it is if you do not have access to the source code of the dll but I think it is fairly simple. Steve

See also: Thanks, Tero

See also: Thanks, Tero

Hello, I’m the creator of Embedded Controls. To clarify the question of m. Smithz; * Navision cannot use OCX components standard in its forms. * Embedded Controls works arround this limitation by using an automation wrapper layer which handles communication between the OCX and Navision. But Embedded Controls can only handle the controls shipped whith the product. Not your own OCX controls ! * The wrapper also forces the OCX component to use one of navision forms to host the visual component onto. * The OCX inherits some of that forms properties like size. So in a way it is possible to use OCX components but it is hard to get there. In theory it wont pay of to create your own (and i’m sorry we dont tell our secrets). But if the Embedded Controls suits your needs then these controls are fairly easy to integrate and customize into Navision by a Navision Solution Center. Embedding components has some advantages in opening external windows as the components are not blocking (modal) the navision application and it is fully interactive. For example, we are now creating a Gantt Chart (which is not sure to be commercially available but a success at our customers). In this Gantt Chart you can for example zoom directly to an item or production order by right clicking in the planning which could not be done when the control is hosted on a non-Navision form.

Thanks for your input Jan-Pieter. I was hoping you would post a comment to this dicussion.


Thanks for your input Jan-Pieter. I was hoping you would post a comment to this dicussion.
Originally posted by nelson - 2005 Mar 14 : 21:10:00

sorry for the delay then … just came back from holiday [8D]

Hi Jan Pieter, thanks for your answer. This cleared some issues. By the way, the version we are looking at (Navision 4.0) has Gant Charts out of the box. They are not integrated in Navision forms, but they work with the navision data, save changes back and obviously come with the product. Regards Markus

but are not that customizable and only for production order planning [8D]

Hi You can create .NET automation dlls and call them from navision. Even more than that you can create events in c# or VB and have Navision respond to them by setting the automation variable to be with events. Paul Baxter