The following is a list of the projects currently hosted by Edgerunner:

Entries in Navision (1)

Saturday
Nov272010

C/Side Integration Utilities

Version: 1.4.21.318 Alpha

Contributors:  Kamil Sacek, Jan Pieter de Boer
Status: In development
Description: A set of .Net classes that act as a wrapper for communicating with running instances of Microsoft Dynamics Nav.  This is accomplished via the COM running object table.  The purpose of this wrapper is to simplify the workings of communicating with the running object table instances, so that anyone fluent in .Net programming can easily interact with running Dynamics Nav clients.  Thanks to Kamil Sacek, Soren Nielsen and Abhishek Pareek.  Without the foundations laid by these people, I would never have written this.

This library still has one minor known bug and I'm sure some other unknown ones so just keep that in mind.  I have added a good deal of locking to this project in an attempt to make it thread safe but it is still not 100% thread safe so keep this in mind.  Given the single threaded nature of the Dynamics Nav client there is really little point to using this in a multi-threaded manner.  In the event that the client is busy (such as displaying a modal dialog) the locking code will wait till the client becomes responsive to lock and then carry on operation.  This means that if you do not wish your code to wait forever, you should check the IsBusy property of the client in advance and handle this result accordingly before calling any methods or properties on the client instance.

IMPORTANT:  When using this library it is very important you call Client.CleanUp() when you are done working with the Client instances or you should explicitly call Dispose() for each instance you work with.  This is because the .Net garbage collector is quite aggressive when it comes to disposing of COM instances, and it will dispose of some resources the Client instances still have references to, before the client can properly dispose of them.  The result of this can be instability in any Dynamics Nav client instance you have bound to.  This is all due to the event subscriptions, so if you creating client instances without binding the client events, you will not have to worry about this.  The primary outstanding known bug is also event subscription related.

NOTE: If you are building a project on a x64 operating system and having problems, you must set the target platform of your application to x86 for this to work.  Due to the fact that the Nav interfaces this wrapper makes use of are compiled in 32 bit only, my project also had to be targeted for 32 bit.  This also means any applications that use it must likewise target 32 bit.  This doesn't mean it won't run on 64 bit just fine though :)

Download the latest release from my Repository on BitBucket