Options

How to call a Navision data port from outside

balhiniobalhinio Member Posts: 28
edited 2012-02-23 in NAV Three Tier
Hi all,
I have a data port that export a list of invoices, I want to run this data port from another system.
is it possible?
Thanks for help

Comments

  • Options
    ara3nara3n Member Posts: 9,255
    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


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    balhiniobalhinio Member Posts: 28
    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.
  • Options
    deV.chdeV.ch Member Posts: 543
    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.
  • Options
    mohoqmohoq Member Posts: 14
    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

    Good Luck
  • Options
    deV.chdeV.ch Member Posts: 543
    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.
  • Options
    balhiniobalhinio Member Posts: 28
    Hi friends,

    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.!!
  • Options
    deV.chdeV.ch Member Posts: 543
    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.
  • Options
    VjekoVjeko Member Posts: 55
    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/
  • Options
    Alex_ChowAlex_Chow Member Posts: 5,063
    As many stated before, dataports will not work in NAS or webservices.

    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.
Sign In or Register to comment.