Talking to Navision
vaibhav_soul
Member Posts: 17
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:
The Comcom::MessageReceived(VAR InMessage : Automation "''.IDISPATCH") trigger looks like -
Code:
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<
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<
0
Comments
-
ok.. i think the above trigger is for XML messages. Does this mean that the trigger would not work for normal messages? If so, can anyone guide me which trigger I would need to use for normal messages? Thanks.0
-
The trigger will be fired, if message with correct label will be placed into the queue. Look into the example, which label is used. Also you can search this forum for the examples.0
-
Did you run CU in SingleInstance mode?
Reading messages (regardless XML or text) you have to try saving in txt file if you are not sure what is comming in (out).0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
