Navision Integration with 3rd party Application?

devnutdevnut Member Posts: 9
Hello,
I am new to Navision and am having a bit of trouble wrapping my head around some of the concepts discussed on this fourm.

Here are some of the questions I have:

1) When integrating Navision with MS CRM, why is BizTalk the popular choice as a communication link?

2) Could integration between Navision and 3rd party application be done without biz talk? I.e. Can webservices be created for navision that will allow the creating and retrieval of data in Navision?

3) In terms of creating a custom solution for retrieving and creating data in Navision. What does this require? Writing codeunits in Navision? Queues to pass messages to Navision? Is there a process for this, or any documentation around this?


Any input is appreciated.
Thanks in advance!

Comments

  • DenSterDenSter Member Posts: 8,307
    re 1:
    I don't think Biztalk is "the popular choice" to integrate with MS CRM, it's what we used in our little implementation because at that time that was the best solution, since the customer already had Biztalk running. The project was sold under a very tight timeline so we decided to go with what would be the least amount of development. So we used our commerce gateway knowledge and our biztalk experience and leveraged that and created the integration in about a month.

    If I had to do it over again I'd probably develop my own piece between navision and MS CRM, but that would mean a heck of a lot more development time.

    re 2:
    Yes you can integrate with Navision without BTS. You can consume a webservice from Navision, but creating a webservice to get into Navision is problematic at this point. There are some possibilities with C/FRONT that you can use, but that only gives you some data access. There is no way to trigger business logic (i.e. posting routines and such) that way.

    We have a number of integrations running where we send XML docs into a message queue, and a Navision Application Server receives and processes them. This way is the most flexible way to integrate with navision in my opinion.

    re 3:
    NAS with message queuing is probably the easiest way to implement this. It's al custom development though. If you have access to a Navision product cd, take a look in the doc folder, there should be a file called "w1w1atas.pdf" which should tell you all you need to know about NAS.
  • devnutdevnut Member Posts: 9
    Hi,
    Thanks for the quick reply.

    I am interested in the following scenario:

    1) 3rd party app sends request to create record in navision
    2) navision recieves request and creates record
    3) id of record in navision is returned
    4) 3rd party application recieves id of record created

    Is this something biz talk can accomplish?
    Would this also require NAS ?
    In order to obtain this functionality must code be developed for navision?

    and as a side:
    what is a "codeunit" in Navision?


    Thanks!
  • lzrlzr Member Posts: 264
    You can use the new feuture Employee portal which is available for Navision 4.0 SP1 for editing Navision data.

    Employee portal is integrated with Sharepoint and gives you a web interface for handling Navision records.

    You require NAS for this.

    You can also use either Expandit http://www.expandit.com online connector or Scriptserver http://www.scriptserver.com tools if you don't have Navision 4.0 SP1.
    Navision developer
  • HalMdyHalMdy Member Posts: 429
    devnut wrote:
    and as a side:
    what is a "codeunit" in Navision?

    A CodeUnit is, as it says, a "Unit of Code". It's an object containing only functions that could be called by other objects. It's a kind of library in the Navision DB.
  • DenSterDenSter Member Posts: 8,307
    right, it's like a module in VBA that holds code only.
    I am interested in the following scenario:

    1) 3rd party app sends request to create record in navision
    2) navision recieves request and creates record
    3) id of record in navision is returned
    4) 3rd party application recieves id of record created

    Is this something biz talk can accomplish?
    I think this wold not be a suitable scenario for Biztalk. The NAS / message queue combination is also used for web interfaces like Commerce Portal, so that would probably be your best bet in this type of roundtrip transaction type things.
  • devnutdevnut Member Posts: 9
    Thanks that clears that up!


    Would somebody be able to explain the relationships between the following?

    Navision
    Navision application server
    Commerce Gateway
    BizTalk

    I am mostly puzzled by the role of commerce gateway and NAS....


    Thanks!
  • DenSterDenSter Member Posts: 8,307
    Navision = Navision, I don't know how else to say that :)

    Navision application server, or NAS, is a Navision session that runs without user interface, and you can have this run as a windows service. This is what you would use to automate things in Navision.

    Commerce Gateway is the Navision B2B document exchange portal that works with Biztalk. You send docs into biztalk, biztalk sends it to Navision by way of the commerce gateway functionality. You want to use Commerce Gateway, you have to have Biztalk.

    Biztalk = Biztalk, that's just what it is.
  • devnutdevnut Member Posts: 9
    Hi DenSter,

    Thanks for the clarification.


    I am still a little unclear on how NAS and Commerce Gateway are configured?

    If these are services, are they configured through config files?


    Thanks!
  • DenSterDenSter Member Posts: 8,307
    Nope, services have property pages that you can use to configure them. There is a setup management console snapin for additional startup parameters, and you can also use command line switches when you install the NAS as a service. If you have the product cd, look for a file called w1w1atas.pdf in the doc folder, that explains it all.

    You will also find a file with something like ecomm in the title that explains how you can configure commerce gateway.
  • devnutdevnut Member Posts: 9
    Thanks!
    I will check it out
  • cnicolacnicola Member Posts: 181
    Hi Devnut,

    For one of my client I built a web interface to communicate to Navision.
    Their outside application would send an XML to a webservice with the type of document to be created and posted in Navision. The webservice we used would take that XML and put it in a Windows message queue. Then a Navision program (started with NAS) would take that XML and process it. On determining what type of action is needed would test the data to make sure is valid and then attempt to post it. If any error occured at the testing or posting phase an XML would be made in Navision with the error or if the posting was successful an XML would be made with the no. of the posted document. That XML would be put by Navision back in the message queue and the webservice would send it back to the other application.
    That can be done with any Navision 3.XX. I used 3.70 since that allowed me to use the XMLPort feature in Navision but can be done with earlier versions just a little more code though.
    I think it is a much cleaner version and with less hassle than using Commerce Gateway.

    Hope this helped.
    Apathy is on the rise but nobody seems to care.
  • DenSterDenSter Member Posts: 8,307
    You mean 4.0, 3.70 did not have XMLPorts yet.

    This is exactly the kind of integration I am talking about. This business with Message Queuing seems to be the most flexible solution that I have seen so far.
  • ShenpenShenpen Member Posts: 386
    devnut wrote:
    Hello,
    I am new to Navision and am having a bit of trouble wrapping my head around some of the concepts discussed on this fourm.

    Here are some of the questions I have:

    1) When integrating Navision with MS CRM, why is BizTalk the popular choice as a communication link?

    Guess why: because all three are Microsoft products and they like to sell their products :D Seriously, MS CRM 1.0 expects data in XML so I think BizTalk might work, yes. If you don't want to buy BizTalk, you can write XMLports out of Navision, or even hand-code XML - it is not as ugly as it seems, with my two simple XML functions I wrote, exporting XML data to a banking application is like
    StartElement(3,'Amount Currency="HUF") ' + GenJnlLine.Amount + EndElement('Amount');
    
    it is quite nice, safe and maintainable, so it can also be an option if you happen to hit some wall with XMLports.

    But anybody who buys MS CRM 1.0 is completely insane (and WE are completely insane, we bought 75 licences... :D ) as it is completely unusable product with less features than an Access database you create in three days, so better to wait till MS CRM 3.0. MS CRM I think it accepts XML too but I am not very sure. However, MS CRM 3.0 works with a very simple Object.method way too, so you can create f.e. contacts like Contact.Name = "Joe" in a C# program. So it can be even easier, Navision -> CRM is a web service querying Navision database (if you use the MS SQL option, which is a good idea I think) and inserting records into MSCRM and CRM -> Navision might be a .NET OCX you call from Navision code. But I think you could try BizTalk if you don't like it, I think it should work with 3.0 too.

    Based on what I read in the CRM SDK, I think they suggest integration in a C# programming way.
    2) Could integration between Navision and 3rd party application be done without biz talk? I.e. Can webservices be created for navision that will allow the creating and retrieval of data in Navision?

    Or flat files, XML, etc. As for web services (why do you need a web service?) reading data from Navision can be a simple SQL query (beware of option fields) and writing data is harder, you could take a look at Navision Applicaton Server. But good ol' flat file is always a safe option. Preferably XML, it is much easier to troubleshoot.
    3) In terms of creating a custom solution for retrieving and creating data in Navision. What does this require? Writing codeunits in Navision? Queues to pass messages to Navision? Is there a process for this, or any documentation around this?

    Is there some docs around mibuso downloasd about NAS and the Microsoft Messaging Queue but do you really need this? Can't your codeunit go the simple and safe way of creating and reading XML or flat files? I personally don't really trust such complicated methods, so my NAS application simply reads a directory in every second (timer) and if there is a file appeared there called 1.cmd then do command 1, if the file is 2.cmd the do command 2 and of course delete the file... an easy and debugabble way of solving problems. The problem with messaging queue and whatever other complicated stuff are that if it does not support something you need then you are in trouble, but if you stick to the simple solutions such as reading or writing files you cannot really meet big ugly surprises... IMHO of course.


    Any input is appreciated.
    Thanks in advance![/quote]

    Do It Yourself is they key. Standard code might work - your code surely works.
  • ShenpenShenpen Member Posts: 386
    It seems two experienced guys here state that Message Queue does work well and has no ugly surprises so yes it also might be an option. I personally mistrust any solution where I am not in 101% control and usually think it is better to reinvent messaging tru flat files in a directory system because better use a sword that _does_ work than a gun that _might_ work, but if you are sure it works and works always and has no bugs and no strange limitations and suprises, then I agree it can also be an option.

    Do It Yourself is they key. Standard code might work - your code surely works.
  • devnutdevnut Member Posts: 9
    Thanks for all the great information!
    As expected, there seems to be many ways to implement an integration.

    I have heard lots of great ideas, I am now interested in actually understanding the work behind the implementation.


    Is there documentation around creating a NAS application, or creating a web service to work with NAS?
  • ShenpenShenpen Member Posts: 386
    Yes, here in mibuso, in the downloads somewhere. Describes NAS and messaging. For web service I don't think so but I think it can be a "normal" webservice that messages to NAS, isn't it?

    Do It Yourself is they key. Standard code might work - your code surely works.
  • cnicolacnicola Member Posts: 181
    We had someone write a web service for us but pretty much anyone with .Net knowledge should be able to do it.
    I can offer you the contact details of the person that did our if you want to.
    Apathy is on the rise but nobody seems to care.
  • devnutdevnut Member Posts: 9
    cnicola wrote:
    We had someone write a web service for us but pretty much anyone with .Net knowledge should be able to do it.
    I can offer you the contact details of the person that did our if you want to.

    Hi cnicola,

    Could you describe what your web service does? I.e. The functionality, does it retrieve data from Navision and also update data in Navision?

    Also, do you know if the web service communicates with Navision through NAS or does it communicate with Navision directly?


    Thanks!
  • ShenpenShenpen Member Posts: 386
    It's not possible to communicate to Navision directly, because everything is done by the client, not the server. (OK if you leave a client running maybe it can check the message queue or such but that means one wasted user licence)

    Do It Yourself is they key. Standard code might work - your code surely works.
  • devnutdevnut Member Posts: 9
    So the function of NAS is to allow you to run a codeunit that is trigerred to handle external requests e.g. picking up messges from a queue and writing back message, correct?
  • cnicolacnicola Member Posts: 181
    XML messages are sent to the web service using SOAP by other programs. The Web service strips out the SOAP envelope and pushes the XML message onto a Windows queue (depending on the method called when the request is sent). Also it reads from outgoing message queues to see if there are any messages and sends those XMLs to the sender program.

    NAS starts a codeunit I wrote that reads the message queue and processes the XML and based on results pushes an XML on the outgoing message queue.

    So the web service and NAS are not really aware of each other's existence.

    P.S. Damn I can never write a short concise message ... ](*,)
    Apathy is on the rise but nobody seems to care.
Sign In or Register to comment.