Get custom view on voice event

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.


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");

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

Thanks.

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.

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.

hi, Did you manage to fix this?