Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: asfmDPTE on February 25, 2016, 12:28:15 PM

Title: Get custom view on voice event
Post by: asfmDPTE on February 25, 2016, 12:28:15 PM
Hi!

I'm facing troubles when getting a custom view, defined previously and linked in the initialize method off the module.
I get in the right way when I call another extension, but, I get errors when I receive a call in the WDE.

[code]
InteractionVoiceToolbarView toolbarView = interaction.UserData["InteractionView"] as IInteractionVoiceToolbarView; // get a ref to some view we see on the screen
            IDictionary<string, object> contextDictionary = (toolbarView.Context as IDictionary<string, object>); // turn its Context into a dictionary
            object caseViewObject;
            if (contextDictionary.TryGetValue("CaseView", out caseViewObject))
            {
                ICaseView caseView = caseViewObject as ICaseView;
                CustomView v = (CustomView)viewManager.GetViewInRegion(caseView, "InteractionWorksheetRegion", "InteractionForm");[/code]

The problem I have is that when an incoming call is received in the WDE, InteractionVoiceToolbarView toolbarView is null.

Thanks.
Title: Re: Get custom view on voice event
Post by: daniel_san on March 03, 2016, 11:10:40 AM
Wich event are you using to retrieve this view?

Maybe on the time of this event the view is nulll, and you have to try it later.

Regards.
Title: Re: Get custom view on voice event
Post by: asfmDPTE on March 03, 2016, 11:56:57 AM
I'm recovering the view in the EventEstablished event. It works fine on outgoing calls made from the WDE, but it fails when an incoming call arrives.
A little weird thing.
Title: Re: Get custom view on voice event
Post by: qtalal on November 08, 2016, 10:17:52 AM
hi, Did you manage to fix this?

[quote author=asfmDPTE link=topic=9382.msg42371#msg42371 date=1456403295]
Hi!

I'm facing troubles when getting a custom view, defined previously and linked in the initialize method off the module.
I get in the right way when I call another extension, but, I get errors when I receive a call in the WDE.

[code]
InteractionVoiceToolbarView toolbarView = interaction.UserData["InteractionView"] as IInteractionVoiceToolbarView; // get a ref to some view we see on the screen
            IDictionary<string, object> contextDictionary = (toolbarView.Context as IDictionary<string, object>); // turn its Context into a dictionary
            object caseViewObject;
            if (contextDictionary.TryGetValue("CaseView", out caseViewObject))
            {
                ICaseView caseView = caseViewObject as ICaseView;
                CustomView v = (CustomView)viewManager.GetViewInRegion(caseView, "InteractionWorksheetRegion", "InteractionForm");[/code]

The problem I have is that when an incoming call is received in the WDE, InteractionVoiceToolbarView toolbarView is null.

Thanks.
[/quote]