Pass data from dynamics to CCA

Apr 16, 2013 at 7:59 PM
Edited Apr 16, 2013 at 10:20 PM

How do you listen inside CCA for a CRM entity to be created and pass that information to CCA?
Apr 17, 2013 at 7:37 AM
One quick way could be..
  1. Fire a dummy url "OnSave" of CRM entity (some thing like "http://EntitySaved")
  2. Catch the URL in Web Adapter's OnNewWindow
  3. Check if it is the required DummyUrl
  4. If yes, Do the required logic
  5. Suppress the New window by returning false
All the above stuff will work if the below conditions are true :)
  1. Assumed that user will access CRM only from CCA and not directly from IE
  2. A custom web adapter is in place
-Happy coding..

Apr 17, 2013 at 7:52 AM

we solved that issue with a WCF Service (DuplexChannel) to which the CCA Clients connect on StartUp. The CRM hosts a PlugIn linked to the create Event of the required Entities. On creation of a new Entity, the Plugin does a call against that service - the service notifies all logged in AgentDesktop instances via the services CallbackChannel and provides the needed information.

Apr 17, 2013 at 8:17 AM
Thats a good idea Niklas. In fact, that is one of the approaches we are trying to do now in our scenario too..

Can you share if you faced any difficulties while doing so? Came to know that, there might be a chance that the service might break if there is any iisreset happened. Any such kind of hickups?

Apr 17, 2013 at 9:11 AM
yes, basically you have to handle two scenarios:

-Network connection is not longer available. There it makes no sense to try to reconnect until the network connection is available again
-Connection breaks for any other reason. Here you need a BackgroundWorker which tries to reconnect until it succeeds

Its a bit work to do but once you got it straight - it works like a charm