Call Navision dataport from other programming language

sindrem
Member Posts: 10
Hey people
How can I call a Navision Dataport from an other programming language such as VB, C++ etc?
I am planning to use the pre-defined dataport SalesOrder to send orders directly from web to Navision Attain 3.6
I have tried to find such functionality in the CFRONT API. But this API seems to be more like a data layer than a business layer.
If anyone has any examples, that would be nice.
How can I call a Navision Dataport from an other programming language such as VB, C++ etc?
I am planning to use the pre-defined dataport SalesOrder to send orders directly from web to Navision Attain 3.6
I have tried to find such functionality in the CFRONT API. But this API seems to be more like a data layer than a business layer.
If anyone has any examples, that would be nice.
0
Comments
-
it doesn't work ... you can only access table data and no trigger, forms e.g. ... its the same that if you connect via odbc or something else the code in the trigger won't be run ..0
-
Hmm.. that’s really disappointing.. Anyone have any other idea on how to send a sales order directly to Navision?
Is the only way to do this, to insert the values directly to the tables? It's quite difficult to know what tables that are related to each other, and what logic that runs in Navision.0 -
what is about using the navison communication components and the application server ? this would be the solution the commerce gateway uses ... or running a batch-job which reads the orders out of a directory ?0
-
Thanks for all the input pduck. I will use Google to find some infomation about Navision communication components and application server.
Hope it ends well
Sindrem0 -
Sindrem,
you can use MSMQ or Named Pipes to send data (in any format) to a Navision Application Server waiting for input. In this way you can insert data into Navision tables running the code in the OnValidate trigger.
You can insert data into the tables 36 and 37 to create a Sales Order and then you can post it as like you have created it form a Navision client.
Andrea0 -
It is even possible to insert data directly into a queue table via the ODBC driver. (If your Navision DB is on a SQL server, you can use the standard SQL OLE-DB driver)
If you have a working DSN connection you can program against it like you were programming a SQL connection (with SQL statements, etc).
Once the data is in the queue table you can process the data with the Navision Application Server (NAS)
GreetingsNow, let's see what we can see.
...
Everybody on-line.
...
Looking good!0 -
Yeah, that sounds like a good idea. I have just installed NAS on my machine. Hmm.. But the service wont start..
Do I have to make queue tables for all tables related to tables 36 and 37? Or will NAS use Navisions business layer logic to solve this, and insert records to all related tables?
This forum is really helpful!0 -
The NAS needs some parameters to connect to the right database, company.
You can find these in the pdf file that comes with the NAS.
The best way to go about this is to write a seperate function (codeunit) that is called from the NAS and that will create the Sales Order (following the desires and wishes of the customer).
It does not mean that you have to create a table per affected table in Navision but this must be analyzed first of course.
But this means some programming work, because the NAS has no standard function (except maybe some parts of the Commerce Gateway) to create Sales Orders.
Hope this helps!Now, let's see what we can see.
...
Everybody on-line.
...
Looking good!0 -
Yeah. The codeunit 'BizTalk Sales Invoice' seems to be something close to what I need. I hope
Sindre M0 -
Create a backup of this Codenunit and adjust the bakcup if you want to use this Codeunit as a basis for your own code.
This way you can always use the Standard Commerce Gateway if you want to at a later date in the project.
Greetings,Now, let's see what we can see.
...
Everybody on-line.
...
Looking good!0 -
hi evrey one ,
Really i don't know if i m in the right forum and in the right pagebut what about create a codunit that excute this datatport and export this codeunit like a webservice , and finally acces to this webservice from other language C sharp , vb.... to exceute this dataport ??? i'm asking if this is possible ?
0 -
eriahi wrote:hi evrey one ,
Really i don't know if i m in the right forum and in the right pagebut what about create a codunit that excute this datatport and export this codeunit like a webservice , and finally acces to this webservice from other language C sharp , vb.... to exceute this dataport ??? i'm asking if this is possible ?
0 -
hi geronimo,
i have tryed this soltion but i have this error
Codeunit50056/ExcuteExport() Line 3 : Error 7077897 : Type « Dataport » not suported.
Codeunit50056/ExcuteExport() Line 4 : Error 7077897 : Type « Dataport » not suported.
Codeunit50056/ExcuteExport() Line 5 : Error 7077897 : Type « Dataport » not suported.
Codeunit50056/ExcuteExport() Line 3 : Warning 7077891 : FILENAME function is obsolete.
Codeunit50056/ExcuteExport() Line 4 : Warning 7077891 : IMPORT function is obsolet.
Codeunit50056/ExcuteExport() Line 5 : Warning 7077891 : RUNMODAL function is obsolet.
if i use xml port in this case i can manipulate it coorectly by webservice but by dataport i have those exception , any idea please ?0 -
hi geronimo,
i have tryed this soltion but i have this error
Codeunit50056/ExcuteExport() Line 3 : Error 7077897 : Type « Dataport » not suported.
Codeunit50056/ExcuteExport() Line 4 : Error 7077897 : Type « Dataport » not suported.
Codeunit50056/ExcuteExport() Line 5 : Error 7077897 : Type « Dataport » not suported.
Codeunit50056/ExcuteExport() Line 3 : Warning 7077891 : FILENAME function is obsolete.
Codeunit50056/ExcuteExport() Line 4 : Warning 7077891 : IMPORT function is obsolet.
Codeunit50056/ExcuteExport() Line 5 : Warning 7077891 : RUNMODAL function is obsolet.
if i use xml port in this case i can manipulate it correctly by webservice but by dataport i have those exception , any idea please ?0 -
check the link i posted above. in the last post it says:deV.ch wrote:Because dataports aren't supported on the NST!
the only way you can use dataports in RTC, is with a trick : http://www.dynamicsblog.at/index.php/20 ... -xml-ports
but i don't think that this can work when called by Webservice, but you have to try.0 -
well, I cheked the link , after some research , i found that navision does not support to acces and to run Dataport from a webservice , but widh XMLPort we can do that !! i think that we should convert dataport to a code unit , expose this codeunit like a webservice and then consume this webservice .0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions