Client crashes after executing XmlPort export

asdastyasdasty Member Posts: 26
Hi everyone, I have a problem with NAV 2009 R2

I'm trying to export XML Port with the following code:
XMLPortOrder.SETTABLEVIEW(SalesHeader) ;
XMLPortOrder.SETDESTINATION(XmlOutStream) ;
XMLPortOrder.EXPORT;

after executing third line my client crashes without any message. Am I doing something wrong here?

Comments

  • geordiegeordie Member Posts: 655
    Even in client and NAV server Event Viewer there isn't any message logged?
  • asdastyasdasty Member Posts: 26
    Ok, I have solution for this problem:

    Starting from XmlPortOrder of type XmlPort, to bigtext variable. Solution found on bpsoftware.com
    XMLPortOrder.SETTABLEVIEW(SalesHeader);
    TempBlob.Blob.CREATEOUTSTREAM(XmlStream);
    XMLPortOrder.SETDESTINATION(XmlStream);
    XMLPortOrder.EXPORT;
    
    TempBlob.CALCFIELDS(Blob);
    TempBlob.Blob.CREATEINSTREAM(XmlInStream);
    StreamBT.READ(XmlInStream);
    
Sign In or Register to comment.