Dynamics NAV and BizTalk - I

This will be the first in a series of three posts. 

The objective is to give a general overview of using EDI with Navision and Commerce Gateway (CG)

1 –Commerce Gateway workflow
2 –Customize Commerce Gateway
3 – Using Biztalk

To use EDI with Navision isn’t necessary to use Commerce Gateway or either BizTalk.
There are add-ons that replace Commerce Gateway and BizTalk functionalities.

BizTalk without Commerce Gateway

Users that don’t feel comfortable with commerce Gateway can use other means to achieve the same goal. 

1. Create 2 folders. One for inbound documents to NAV and other for outbound documents from NAV.
2. Create a codeunit to be run from NAS and periodically monitors inbound folders for XML files. If there is any document simply call a function to handle document.
3. Every time you want do send a document do BizTalk, convert document to xml and send it to outbound folder.
4. Configure Biztalk to monitor outbound folder and to write requests to inbound folders

A sample source code is available for download from application Hub and Spoke from Microsoft.

SAP NetWeaver Navision maps, patches and sources to be used with Installation Guide.
https://mbs.microsoft.com/partnersource/downloads/releases/netweaversourcefiles.htm?printpage=false

Commerce Gateway Workflow in NAV

When NAS starts it will call function NASHandler from codeunit 1 . If it’s receives the correct parameters it will start Commerce Portal trough codeunit 99008528 - BizTalk Appln. Srv. Startup

Codeunit BizTalk Appln. Srv. Startup has main two goals.  

1 - Every time a XML document in received from BizTalk is triggered. TcpWrp::DataAvailable
2 – Starts a timer, and for every Timer Event it will call codeunit 99008512- BizTalk Watchdog, to monitor documents to be send to BizTalk. 

Sample Outbound Document

Every time an end-user decides to send a document to Biztalk for example in sales Order the codeunit BizTalkManagement is called.
For example from Posted Sales Invoice is called BizTalkManagement.SendSalesInvoice

BizTalkManagement with the help of other codeunits will copy document into outbound tables.
For example in Sales Invoice the codeunit that inserts in outbound table is 99008523 - BizTalk Sales Invoice.
Outbound table is Outbound Sales Document Header and Outbound Sales Document Line.

Documents in outbound tables are sent to BizTalk using

Codeunit 99008514 - XML Document-Send
Codeunit 99008517 - XML Document-Create

The conversion to XML is done in codeunit Document-Create and it the help a XMLport  

 

Comment List
Related
Recommended