Need Help with Message Queue from Navision 3.60

Hi All, Did anybody have tried this sample from the Developer Guide for Communication Components successfully? If you do, can you tell me how you modify this to work? I have successfully send the message queue but I just can’t get this Receiving queue to work. CREATE(MQBus); CREATE(CC2); CC2.AddBusAdapter(MQBus,1); MQBus.OpenReceiveQueue(‘MyMessageQueueServer\comcom2_queue’,0,0); CC2::MessageReceived(VAR InMessage : Automation) <== Have no clue on this line here InMsg := InMessage; InS := InMsg.GetStream(); InS.READ(Txt); MESSAGE(Txt); InMsg.CommitMessage();

The line you have highlighted is the line that appears in the codeunit when you set the ‘With Events’ property for the Navision ComCom automation variable to true (ie you dont type it, it is a trigger). Code in this trigger is fired when a message is recieved on the specified queue. If you are not familiar with the ‘With Events’ property then do View Globals and select the Navision Communication Component Automation variable, select properties ans set With Events to true. When you return to the codeunit screen you will see the above trigger has been added and you can add the code. I hope this helps, Chris

Hi Chris, I did set the property of the Navision Communication Component Automation with the “With Events”. The problem is that, the event trigger seems doesn’t do anything. I have a couple of messages in the queue but it doesn’t retrieve back anything. Is there anything else do I have to setup in the server or in Navision?? Regards, Ty

quote:


Originally posted by CMGW
The line you have highlighted is the line that appears in the codeunit when you set the ‘With Events’ property for the Navision ComCom automation variable to true (ie you dont type it, it is a trigger). Code in this trigger is fired when a message is recieved on the specified queue. If you are not familiar with the ‘With Events’ property then do View Globals and select the Navision Communication Component Automation variable, select properties ans set With Events to true. When you return to the codeunit screen you will see the above trigger has been added and you can add the code. I hope this helps, Chris