Options

Connecting to Navision from .NET C# App

bhbh Member Posts: 4
edited 2005-12-07 in Navision Financials
Hi everyone

I am currently working on a .NET app that must be able to connect to Navision systems (Financials and Attain in various versions) and do so without making any preparations within Navision (treat it as a black-box).

I am considering to make my own wrapper for CFront.dll, as I can see others are working on as well. But here is my question:

1) Is it possible to make a wrapper based on a certain cfront.dll version and make use of that wrapper for older versions of Navision as well?

2) I have read, that a cfront.net dll is available with the SP1 for Navision 4.0. Could I go ahead and use that out of the box for older versions of Navisions as well (e.g. Financials 2.XX)?

I am new to this forum (as I am new to Navision), but hope someone here can help a C# programmer get started on interacting with Navision.

Comments

  • Options
    DenSterDenSter Member Posts: 8,304
    re 1: I am sure it is possible, what you need to do is study C/FRONT and use it however you want to use it. You will need to know though that not all internal Navision processes are available through C/FRONT. I am not expert at it by any means, but I do know that it will not be possible to write your own Navision client and have it function the way Navision does. That would be a waste of good time and money anyway, because there already is one :).

    re 2: I would be surprised if the 40 SP1 dll would work seamlessly with older versions. If the dll is called 'cfront' then it seems that each Navision version has its own version dll as well.

    Are you planning to write one program that can interact with multiple Navision versions?
  • Options
    kinekine Member Posts: 12,562
    Yes, each version of Navision has own cfront.dll version and if you use another version than ver. of used DB (or used DB server) you will have same error as when you try connect do Db with client of another version... It is working in same way, you need same version of cfront.dll as the ver. of db... But the interface of cfront.dll is same between versions (maybe only some small changes)...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    bhbh Member Posts: 4
    Thanks to both of you. At least now I got that cleared up, although the facts were not entirely as I had hoped for :? .

    I am of course not trying to write my own Navision frontend :D . I am writing an entirely different app all together, and a small part of it concerns the ability to write to and read from Navision Financial and Attain versions without making changes to these or knowing in advance which customizations have been made - meaning I must be able to retrieve metadata about the native database and act accordingly.

    I guess what I need to do is make an Interop RCW in .NET of an arbitrary version of the cfront.dll (since the interface presumably is the same) and then have whoever runs the app copy their particular version of cfront to the app folder (not even sure that is needed, if the dll is registered on the machine should the app server and the navision server be the same machine). The biggest issue here will probably be to find 2 or more different running versions, against which I can test my code, to confirm, that it actually works on different versions.

    Or perhaps cfront isn't the right way to go at all?

    But once again - thanks alot for your prompt responses!
  • Options
    kinekine Member Posts: 12,562
    It is the right tools for you... Do not forget that you need to connect to Native server or MS SQL server... :-) (only change in some parameters when connecting)...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    DenSterDenSter Member Posts: 8,304
    That is going to be difficult if you don't want to do any Navision development to make that work. They deliberately made it difficult to access Navision from the outside. The Navision development involved to make something like that work is pretty straightforward though, and you should really consider that, esoecially if you need to have this working across versions. You can have a NAS instance pick up messages from the message queue, and I believe some members here have made some pretty interesting webservice consumers.
  • Options
    bhbh Member Posts: 4
    Maybe I'm too ambitious here, especially considering, that I have no experience with Navision.

    It is just that I am making a small app for broad use in SMALL businesses. It is not a mission-critical central business app for high dollars, and as such, I would prefer it to work out of the box, without requiring end users to first install this little app and then spend a lot of money having a Navision consultant come prepare the Navision solution (because Navision culsultants don't come cheap - no offence :D ). Such a constraint would simply make the app unfeasible to end users.

    I thought that maybe this could be a viable way to go. But if making a seamless integration to Navision this way is simply a dead end, I would rather know now instead of waisting weeks of time in an up-hill battle that I cannot win. In that case I will just have to settle for less (xsl import/export :( ), and from your replys I get the feeling, that my original intents were perhaps a bit naive. Maybe I am trying to force an approach that was never intended to work in the first place. I am willing to give it some serious effort, if there is hope, that it will actually work well in the end.
  • Options
    DenSterDenSter Member Posts: 8,304
    Well don't be too negative too soon, your approach may work, it just depends on what you want to do. Retrieving and creating data is possible, but processing transactions is not. You should study C/FRONT's capabilities and determine if that is what you need.

    It probably sounds strange to a Windows developer, especially since Navision is a Microsoft product, but so far (up to 4.0 SP1) Navision does not have an API or an object model that you can access in .NET. The integration options are limited (but with a little imagination endless :)), and almost always require you to do Navision development.

    It depends on your design by the way if a user will need the help of an 'expensive' Navision consultant. You could develop a solution that is entirely customizable through setup options. You could write good documentation that explains it all to the users. That way, maybe all it takes is one hour of install and initial setup and the user can take it from there. It's all in the design.
Sign In or Register to comment.