NAS return ok

gmorkengmorken Member Posts: 38
Hello,
I've created a website in asp.net for a testpurpose to insert new order and orderlines in nav. The website is sending msmq-message to nas and nas is calling codeunit to exececute business logic in nav. Everyting is working ok and I'm able to insert orders and lines from the website.
But what I cant see is how to send back a message from nav to the website that everyting went ok?
I know I can send a MSMQ message back from nav to outqueue and read it to the website but how will I know that the outmessage matches my order? Are there som guid or something I can use?

Regards
Tomas

Comments

  • ara3nara3n Member Posts: 9,256
    Did you look at this msdn article?

    http://msdn.microsoft.com/en-us/library/ms952079.aspx

    Web Method]
    public NavDS GetItem(string No)
    {
       string request = "GetItem(" + No + ")";
       mqToNavision.Send (request, "Navision MSMQ-BA");
       mqFromNavision.Formatter = new
          System.Messaging.XmlMessageFormatter (new Type[] {typeof (NavDS)});
       System.Messaging.Message msg = 
          mqFromNavision.Receive (new System.TimeSpan (0,0,0,30));
       NavDS nds = new NavDS ();
       nds.ReadXml (msg.BodyStream, System.Data.XmlReadMode.Auto);
       return nds;
     }
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Try searching the Navision e-Commerce forum. I found this (old) thread Message Queue Send doesn't tell me the ID which talks about a Correlation ID.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • gmorkengmorken Member Posts: 38
    Nice, thanks. That should work if I set createreply on the msmqmessage.
Sign In or Register to comment.