XMLPort Path

bekiobekio Member Posts: 204
Hello everyone,

I have created a XMLPORT and i run it via codeunit. But i can not find where is the xml file created.

Need help.

Comments

  • ara3nara3n Member Posts: 9,256
    please show us the code. Thanks.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • bekiobekio Member Posts: 204
    The code is like this

    Transheader.RESET;
    Transheader.INIT;
    IF Transheader.FINDFIRST THEN
    REPEAT
    IF Transheader.Status=Transheader.Status::Released THEN
    IF Transheader."Date Created" < WORKDATE-2 THEN BEGIN
    TransHeaderXML.SETTABLEVIEW(Transheader);
    TransHeaderXML.Released();
    //MESSAGE('Done');
    END;
    UNTIL TransHeader.NEXT=0;
  • ara3nara3n Member Posts: 9,256
    you are nor running the xmlport TransHeaderXML.
    Transheader.RESET;
    Transheader.INIT;
    IF Transheader.FINDFIRST THEN
    REPEAT
    IF Transheader.Status=Transheader.Status::Released THEN
    IF Transheader."Date Created" < WORKDATE-2 THEN BEGIN
    TransHeaderXML.SETTABLEVIEW(Transheader);
    TransHeaderXML.Released();
    MyFile.create('C:\myxmlfile' + Transheader."No." + '.xml');
    MyFile.CREATEOUTSTREAM(outstr);
    TransHeaderXML.SETDESTINATION(outstr);
    TransHeaderXML..EXPORT;
    MyFile.close;
    END;
    UNTIL TransHeader.NEXT=0;
    
    MESSAGE('Done');
    





    You need to do it something like this.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • bekiobekio Member Posts: 204
    I am using this XMLPort to create a notification.
    So i have this report, and when i run it via Navision Interface (C/Side) it is ok and works perfect.
    But i have added this as a report to be executed via NAS(i have created a job queue ect..), and NAS executes this report but don't send a notification. When i run this report manualy it is working and sends a notification.

    Any suggestion.
  • ara3nara3n Member Posts: 9,256
    what is the error in job queue?


    Also, make sure the user running nas has admin permission.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • bekiobekio Member Posts: 204
    No error is displayed.
    I have also debugg this code(with NAS Debugger) and it goes throught this code same as i run manualy report.
    But it does not send the notification. I use the same Windows User for NAS and when i run report manually.

    With the same user i run report manualy and via NAS.

    I don't have clear idea, what XMLPort does export when i use it for business notification(what exactly xmlport do, exports some .xml files, or what, if it exports where can i locate a files that business notification reads).

    Need help!

    Thanks in advice.
  • ara3nara3n Member Posts: 9,256
    I have not worked with notifications.
    If you are not a partner, see if you can get help.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • bekiobekio Member Posts: 204
    Thanks,

    I hope at least someone had this problem, and can help me! :roll:
  • bekiobekio Member Posts: 204
    :( :roll:
Sign In or Register to comment.