The company I'm working has more than 100 shops using Navision SQL client on localhost. We use MSMQ and Webservices to get online sales info but updates on Navision databases are very hard because we have to connect them through VNC clients and import fob objects manually.
Finally I get the solution to autoimport fob objects using a NAS, CFront and FTP. The NAS checks a folder where fob objects are uploaded and when detects a new fob file autoimports it using CFront.
I've found lots of solutions like CSideIntegration Utilities (
http://www.mibuso.com/forum/viewtopic.php?f=7&t=44886&start=0) but all them needs a Navision session opened and import objects as text. Of course using NAS we are using a session, but we don't care if the user closes his Navision session.
If the import process fail, we can get the result of the CFront Error Message through a MSMQ sent via WebService.
If someone is interested I can share the solution.
Comments
==============
- Microsoft Dynamic Nav 5.0 SP1
- Navision Application Server 5.0 SP1
- C/Front 5.0 SP1
- Navision Job Queue Module*
- Automation library to interop with C/Front from C/AL**
* Navision Job Queue Module is not necesary but smarter. NAS and a timer is enough.
** I developed a simple c# wrapper (FobTool.dll). I can mail if needed.
HOWTO
======
I created a codeunit with functions to be called from one Task Queue Entry (CU 50000 - Task Queue Management). The main function (ImportFob) checks a directory looking for new *.fob files. If one fob file is detected it connects to CFront and call to CFront function ImportFob(). After import the file is moved to a directory for processed files, if any error occurs it will be moved to another directory.
Task Queue Entry throws ImportFob function every day and captures the success message or error message. I use a WebService to send a message if any error occurs (Implemented in Navision Task Queue module).
SAMPLE CODES
============
- C# Wrapper
============
- ImportFob C/AL Function
=========================
It's necesary to change default paramater values to connect to a Native database.
Thanks to ykerzreho for the request.
Connect function parameters:
netType values:
"NativeNetB" "NativeSecureTcp" "NativeTcp" "SqlDefault" "SqlNamedPipe" "SqlTcpSocket" default value :"SqlDefault"
driverType values
"Native" "Sql" default value :"sql"
I detected some problems importing tables that contains fields used in SIFT tables (like Item Ledged Entry, G/L Entry,...)
Could you please share the objects.
Thanks a lot
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Link of wrapper library: http://dl.dropbox.com/u/24474654/FobTools.zip
I am using a NAV2009 SP1 classic.
Thanks
http://dynamicsuser.net/blogs/vanvugt/archive/2011/08/24/how-to-use-exportobjects-or-importobjects.aspx
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
The link given to download the object is not working. am in need of those objects. Can you share the Object ?