It looks like you're new here. Sign in or register to get started.
Example OnRun() CREATE(MQBus); CREATE(CC2); MQBus.OpenReceiveQueue('MyMessageQueueServer\comcom2_queue',0,0); CC2.AddBusAdapter(MQBus,1); CC2::MessageReceived(VAR InMessage : Automation) InMsg:= InMessage; IF (InMsg.ExpectReply) THEN BEGIN InS:= InMsg.GetStream(); InS.READ(Txt); MESSAGE(Txt); OutMsg:= InMsg.CreateReply(); OutS:= OutMsg.GetStream(); OutS.WRITE('Yes, hello world! OK.'); OutMsg.Send(0); END; InMsg.CommitMessage();
Comments
GD
I was looking at the document example code. And noticed this.
The OutMsg.GetStream returns and istream. How can you assign this to outstream? How does navision compiles this?
OutS:= OutMsg.GetStream();
OutS.WRITE('Yes, hello world! OK.');
OutMsg.Send(0);
Thanks again.