Hi all,
I am having an issue with talking to Navision. I am trying to implement the simple example that uses message queues (as outlined in the Talking to navision document).
The OnRun of the single instance code unit looks like -
Code:
CREATE(Comcom);
CREATE(MSMQBus);
Comcom.AddBusAdapter(MSMQBus,1);
MSMQBus.OpenReceiveQueue('hgnb_07\private$\salesorder',1,1);
The Comcom::MessageReceived(VAR InMessage : Automation "''.IDISPATCH") trigger looks like -
Code:
MESSAGE('hello world');
InMsg := InMessage;
InStr := InMsg.GetStream;
InStr.READTEXT(Line);
IF Line = 'Sales Order' THEN
BEGIN
MESSAGE(Line);
END
ELSE
BEGIN
MESSAGE('Not a sales order');
END;
The trigger does not seem to run at all when messages are within the message queue or when a new message has entered into the mq.
I do not understand what is wrong in here as I followed exactly as described by the article. I am sure that leaving the trigger everything else is working fine. However, why isnt the trigger getting triggered???? Can anyone please help me out?? [-o<
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Reading messages (regardless XML or text) you have to try saving in txt file if you are not sure what is comming in (out).