Export Xmlport from Page- How can i accomplish that?

nav_studentnav_student Member Posts: 175
edited 2013-11-04 in NAV Three Tier
The Subject says it all?

Waht is the best way to export a xmlport from a Page?

Comments

  • nav_studentnav_student Member Posts: 175
    I see a code made by Microsoft and try to adapt to my Page Action.
    IF ISSERVICETIER THEN
      FileName := RBMgt.EnvironFileName('','xml');
    
    IF FileName = '' THEN
      ERROR(Text1110001);
    
    TempFileName := FileName + '.tmp';
    
    OutputFile.TEXTMODE(TRUE);
    OutputFile.WRITEMODE(TRUE);
    IF NOT ISSERVICETIER THEN OutputFile.QUERYREPLACE(TRUE);
    OutputFile.CREATE(TempFileName);
    OutputFile.CREATEOUTSTREAM(OutputStream);
    
    [i][b]xmlport.SetIDFilter("DocNo");
    xmlport.SETDESTINATION(OutputStream);
    xmlport.EXPORT;[/b][/i]
    
    OutputFile.CLOSE;
    
    IF ISSERVICETIER THEN BEGIN
      ToFile := Text1110005;
      DOWNLOAD(TempFileName,Text000,'',Text001,ToFile);
      MESSAGE(Text1110000,ToFile);
    END ELSE
      MESSAGE(Text1110000,FileName);
    CurrPage.CLOSE;
    CheckANDModifyFile(TempFileName,FileName);
    



    when the code reach this lines, the RTC client shuts down
    xmlport.SETDESTINATION(OutputStream);
    xmlport.EXPORT;


    Message: The server net.[url=tcp://localhost:7046/DynamicsNAV/Service]tcp://localhost:7046/DynamicsNAV/Service[/url] is either unavailable of your connection has been lost. Do you want to attempt to reconnect?

    Can you help me?
Sign In or Register to comment.