Hi All,

In Dynamics 365 Customer Engagement (online) I have installed Unified Service Desk. I have created a hosted control with type standard web application. Changed No Adapter to use adapter pointing to the correct assembly and class. 

The class looks like classname: Microsoft.Uii.Csr.WebApplicationAdapter so it is inherited WebApplicationAdapter. 

Created an override  DoAction(Microsoft.Uii.Csr.Action action, RequestActionEventArgs args) and set a breakpoint.

When the hosted application hosting type is internal wpf in the doaction function the Browser is null. When I look into the code of the class of the WebApplicationAdapter it tries to cast the DdaApplicationObject to a WebBrowserExtended (DdaApplicationObject as WebBrowserExtended). When I look into the type of the DdaApplicationObject it is a Microsoft.Crm.UnifiedServiceDesk.Dynamics.Controls.WpfBrowser. 

When the hosted application hosting type is IE process the DdaApplicationObject is Microsoft.Crm.UnifiedServiceDesk.Dynamics.Controls.BrowserControl. This also returns null. 

From the browser I like to get the html document and set some values on the website with document.GetElementId and setattributevalue. 

So the code in the DoAction would be: 

var htmlDocument = Browser.Document as mshtml.HTMLDocument;

var element = htmlDocument.getElementById("test");

element.setattibutevalue("propname", "value");

Can anyone help me out with retrieving the html document and fill the website with some retrieved information? 

Thanks in advanced for your help. 


Stefan Verheggen