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.
0
Comments
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.
Hope it ends well
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.
Andrea
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)
Greetings
...
Everybody on-line.
...
Looking good!
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!
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!
...
Everybody on-line.
...
Looking good!
Sindre M
This way you can always use the Standard Commerce Gateway if you want to at a later date in the project.
Greetings,
...
Everybody on-line.
...
Looking good!
Really i don't know if i m in the right forum and in the right page but 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 ?
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 ?
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 ?