Is it possible to program a Dataport to run on a time schedule once a day with Navision Financials ver. 2.5?
My dataport exports data to a text file so that an SQL server can grab the file and import it into our web application.
I would love to be able to make these things happen automatically on a daily scheduled basis.
0
Comments
You have to create a form with property "TimerInterval" filled in.
In the "OnTimer()"-trigger you can put code that once a day after a certain hour, launches the dataport.
The problem is that if in the night you shut down the DB-server for some reason, in the morning you have to start the Navision-client again with that form.
It is also best that you create a user that has only permission to launch that dataport and that can read/insert/delete the tables in needs for the dataport, and nothing more.
In the user-setup, you can give a menu to be used for a certain user. Put in the ID of the form with the "OnTimer()"-function in it.
The last 2 things is for security, because you have to leave a Navision-client running all the time.
Other possibilities without Navision:
1) if your DB is a SQL-DB, your other SQL-server can read the data directly from the Navision-table.
2) you can create an external program and read the data with the help of ODBC and put this program in the Windows scheduler.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
RIS Plus, LLC
MVP - Business Apps
So use a xml port, report (with File variable) or codeunit (with file variable) to import / export datas.
Regards