I suggest to take a look at NAS but it's it's not possible to run dataport from NAS. You'll need to create a Codeunit to do it.
There are many interfaces on how to integrate with NAS. If you search mibuso, you'll find many examples.
Ahmed Rashed Amini
Independent Consultant/Developer
Thanks for the information,
Im using a code unit that call the data port, and I exposed the code unit as a web service
when I call the methode of the web service the server retrun the follogin 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.
As ara3n said, and as your error massage sais you can't use Dataports with NAS or ServiceTier, if you call them trough a Codeunit or not makes no difference. To do file imports/exports you need to use xmlports which are supported, or code it yourself.
This is an interesting question. I never tried to run dataport from codeunit by exposing the codeunit to the Web Service.
I do not see any logical reason why it should not work.
1. First make sure that the codeunit works without any bug, try running the codeunit from the client
2. Once the above is done then try running it via Web Service
as i wrote it's a trick and it works in rtc not webservices.
I didn't believe it would work anyway.
Dataports are NOT SUPPORTED in any 3-Tier scenario, wheter RTC or webservices. You have to use xmlports (which is capable of importing flat files too) to import in 3-Tier.
Of course that trick can't work under Web services. Running classic reports under RTC really starts the classic client. Basically, RTC starts finsql, and then finsql runs the report. If classic client is not installed on the machine, it will give an error under RTC. Under web services, you can't run reports which don't have a layout, if they are not processing only.
And then again, as everybody has said here - dataports are not supported in any NOT GUIALLOWED environment, and no trick will help. If the code which handles them is not there, what can make them run?
(Co-)author of "Implementing Microsoft Dynamics NAV 2009" http://vjeko.com/
Comments
There are many interfaces on how to integrate with NAS. If you search mibuso, you'll find many examples.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Im using a code unit that call the data port, and I exposed the code unit as a web service
when I call the methode of the web service the server retrun the follogin 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.
I do not see any logical reason why it should not work.
1. First make sure that the codeunit works without any bug, try running the codeunit from the client
2. Once the above is done then try running it via Web Service
Good Luck
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.
I tested the code that run the dataport and the result is good. When I try to call the code unit from the webservices I got the same error.!!
I didn't believe it would work anyway.
Dataports are NOT SUPPORTED in any 3-Tier scenario, wheter RTC or webservices. You have to use xmlports (which is capable of importing flat files too) to import in 3-Tier.
And then again, as everybody has said here - dataports are not supported in any NOT GUIALLOWED environment, and no trick will help. If the code which handles them is not there, what can make them run?
http://vjeko.com/
You will need to convert your dataport into processing only report or XMLports. That's what we did when our clients upgraded to NAV 2009.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book