Event Handling

Hello Folks, I have following question: How can i handle inbound events in Navision 2.6 . e.g.: an incomming phonecall. (I don’t what any third party solution.) What i think: Maybe i can use a dummy account (user), which have open a Form an use the timetrigger in Navision. But who can i look for events outside from Navision. Anyone have some experience in such a kind of problems. ------------------ Best regards Alejandro Schubert EMail: alejandro.schubert@cycos.com

HI You are correct, the on time trigger will allow Navision to “listen” for events within its “universe” (The Computer/Network). The question is how does an incomming call affect this “universe”? Is there some phone call managing software? Does this software write files about incoming calls to disk? If the answer to these questions is yes, its pretty easy isn’t it :slight_smile: I would like to know more about your problem. Craig

I know most of you have heard this over and over. But in NS3.0 there is a new feature called “single-instance” codeunits, that allows you to perfom exactly what you are requesting. And i even think the beta release holds the functionality with an TAPI interface - at least there is a Navision TAPI ocx included. /Soren

okay, i have solved my problem, an external VB Programm check the incomming phonecalls, and write the caller nummer to a file on the hard disk. The navision form, looks for this file, will read it and start working,… Not a very good solution, but i don’t know a better workarround. ------------------ Best regards Alejandro Schubert System Engineer EMail: alejandro.schubert@cycos.com

quote:


Originally posted by SNielsen: And i even think the beta release holds the functionality with an TAPI interface - at least there is a Navision TAPI ocx included.


Hi Soren, Please tell more about this Tapi interface. That’s one of the things in 3.0 that I didn’t hear about. Best regards, Erik P. Ernst, webmaster Navision Online User Group

Hi, As you know Navision Form is standard MSWindows window. It means if you know Handle you can send standard windous message WM_CLOSE from any external programm. When Navision Form recieve this message it runs OnQueryCloseForm trigger. You can run your code in this trigger. If you do not want close form use EXIT(false) We use this couple times before OnTimer trigger. Valentin Gvozdev BMI Inc.

Be aware !! I have used this trick of Valentin also but there are a few new problems wich have to be made a workaround for. 1. When Navision displays a message box sending the WM_CLOSE message will crash navision. There is a function that can check a window if it is able to receive messages. I’m not sure what function it was. If the window is not able to receive messages then you shouldn’t send one. 2. In some unexplainable other situations Navision also crashes. I have never figured out in what situations. Maybe Valentin knows more about this. Not always a nice solution but if you get it bugfree i think it is better then polling for files. In newer versions of navision use automation. Jan-Pieter