XML file not created using xml port running by NAS

smnehalsmnehal Member Posts: 14
Hi ,

I am creating XML file when Order is Posted , It works fine When I post sales Order manually.

But when Sales Order Post by NAS , it post the sales order but the XML file is not created .

I am Using NAV 2009 R2

The Code is :

XMLFile.CREATEOUTSTREAM(XMLOutStream);
XMLPortDealer.SETTABLEVIEW(SalesInvHeader);
XMLPortDealer.SETDESTINATION(XMLOutStream);
XMLPortDealer.GetInvoiceNo(SalesInvHeader."No.");
XMLPortDealer.EXPORT;
XMLFile.CLOSE;

I also set the property "Encoding" from the XMLPort to UTF-8 , but it not creating XML file using Navision Application Server (NAS).
Can you please help ](*,)

Thanks
SMN

Syed

Answers

  • poloniouspolonious Member Posts: 64
    Hi,

    - Is it something to do with the user that the NAS service runs under? Try logging in to the NAV client as the same user that the NAS service runs under and post an Order manually to see if its a problem with the user setup?
    - Are there any windows popping up from the XMLPort when you run it manually, if so these should be handled by GUIALLOWED for the NAS to run it?
    - You could put the NAS in Debug mode to see where it is falling over?

    G'd luck!

    P
  • kinekine Member Posts: 12,562
    Check event log for more info. In your code there is not clear how the target file is created and where it is placed.

    And if you are talking about standard NAS, this post should not be in NAV Three Tier, because it is still classic stack.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • smnehalsmnehal Member Posts: 14
    Hi

    @ polonious :
    I post the order manually under same account as NAS , its working fine . The xml file is created.
    But by NAS its not creating xml file after posting order.

    @ kine :
    Target file is Create :

    D:\XMLFILe\InvoiceNo.xml

    Can any one have solution to create xml file by NAS .?

    Thanks
  • poloniouspolonious Member Posts: 64
    Hi, as per Kine's suggestion have you checked the Event Viewer after the NAS job has run to see if there are any events created. Any errors from the NAS job will be in here.

    Since you've ruled out a user setup problem, if the Event Viewer doesn't show up anything, i would run the NAS in debug mode to find out where its stopping!?
  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from 'NAV Three Tier' forum to 'NAV/Navision Classic Client' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • smnehalsmnehal Member Posts: 14
    edited 2012-11-14
    Hi ,

    I run the NAS in debug mode , its invoice the sales order and but not creating the XML file.
    No error message on event viewer.

    The issued resolved by file path was not correct.

    Thanks
  • kinekine Member Posts: 12,562
    Than question is, if it really go into the part for exporting the XMLFile (like condition "if GUIALLOWED then")... could you debuig the process? Or you can add some messages to track the process (the messages will be written to Event Log).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.