Link to home
Start Free TrialLog in
Avatar of victkh
victkh

asked on

How do I pass infomation to another application?

ok my problem is that I got this program that will recieved an ID from another computer and upon recieving it, the user can choose to accept this ID.
If this ID is accepted, it should pass the ID to the CRM system and then display the details of the customer with the ID.

Now my problem is how do I go about passing the ID to the CRM system to invoke a search on the system and then displaying the result from my program?

Can you suggest some ways for me to do this?
Avatar of DanAvni
DanAvni
Flag of Israel image

if the crm application has an API maybe that's the way
if it has DDE maybe that is the way
at worst case you could do something like: find the CRM app window and set focus to it, them use the sendkeys command to simulate user trying to find this ID
Avatar of Belfry
Belfry

yeap, at least you should know how this ID is accepted by the CRM app, have you tried passing this ID as a parameter, like Shell "crm.exe IDString" ?
if you have the source or you know how it works,it's rather easy, but if you don't, you may possibly debug it(by softice or other debuggers) to check out the way ID is passed.
Perhaps you can find a way to get access to the data source of the CRM without having to interact with it directly.  If the CRM has any capability to export data then you could search for the information you need in external files...or if the information is kept in a database that you can have access to over a network then you can search for the result directly from your own application and bypass the CRM.
You have basicly 4 options:
DDE: don't know too much about this one
COM: interface
API: calls the send messages to other apps
File Drops:  We have several legacy systems that make wide use of this.  Its probably the most horrid means of interapplication communication but it will work with any laguage that can read a text file.  You basicly have one prog make and drop the file, and then have the other prog poll the direcory for this file on somesort of regular interval.  The plus side to this is that it can often communicate with programs that never meant to be able to speak with other apps.
If COM, DDE and API is not possible you can use sentkeys to get the Infos to the App. (It,s not a verry nice Way, but its possible!)
And you could try running a report tool from the CRM to report this cust to a file and read this afterwards.

Also if this is a modern CRM maybe it has WebServices so you can submit a http request and get XML data in return....
Avatar of victkh

ASKER

erm.. thanks so far for answering my question but basically, I must take in the fact that there alots of CRM on the market(sorry my company does not work with only one CRM), and I must take in regard, that my program must work for most of the popular CRM..

So far, my boss did suggest, that sending keystroke to the CRM by using the Spy++ to find the CRM window.But it might not work if i got another type of CRM.

Accessing the datasource is not the way, as most CRM do not had the same type of datasource.
IF i use the API, will it work when i use another CRM?

But as for Dynamic Data Exchange(DDE), I don't know much about it but do hope someone can provide me more information and Da_Weasel (Can you explain more on the file drop method?)

Thx in advance
ASKER CERTIFIED SOLUTION
Avatar of DanAvni
DanAvni
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Basicly the 'file drop' method is this:
One program creates a file in a place on the network when some event happens.  Another program checks that network location for the existence of that file.  If is finds it then it opens it and reads the data.

Example:
We use this to get our order entry software to open to the appropriate account.  A call comes in and is assigned to an operator.  A file is created that has the same name as the computer that the operator is using.  The order entry software checks to see if the file [computername].pop exist.  If it does then the application opens the file, reads the number from it, and attempts to open and account with that number.

This is certainly not the best method but its a great fall back when nothing else will work.
Avatar of victkh

ASKER

Currently, there no a sure solution for my question but it seem that, no one else can provide me answer, so i shall accept the one closely solution that i can be use..so as to close this question as well

Sorry to the other guys