Changing HostedWebApplication URL dynamically

Jul 3, 2012 at 7:15 AM

Hi,

As per the requirement, I need to navigate to different URLs of a hostedWebapplication based on the Top Panel tab changes(FYR, all these tabs are related to same customer).

As of now, I'm doing it like Completly unload the hostedwebapp and create a new app whenever, which is causing some time consumption and also in many times crashing the App with some error.

Can some body suggest a better way of doing it. FYR, below is the sample i'm doing.

var

 

app = new HostedWebApplication(Guid.NewGuid(), "Sample Page", ConstructInitStr(false, "about:blank", false, VMEnums.DesktopPanels

.MainPanel2.ToString()));

 

this.Desktop.MainPanel2.Add(app, false

);

app.AddAction(0,

"default"

, ConstructInitStrforAction(UrlString));

app.Initialize();

app.DoAction(0, ConstructInitStrforAction(UrlString));

PS:I'm new to CCA and many of you guys might feel that this is the utterly wrong way of doing. Plesae suggest a better approach if it is wrong.



Thank you,

Srikanth

Jul 9, 2012 at 9:21 PM

No,, this is really the wrong way to do that.. :)
Can you describe the scenario your trying to achieve?  Also have you looked at the CCA examples?

mattb

Jul 10, 2012 at 4:08 AM

Hi Matt,

Thanks for the reply. But we found some alternate for this. Instead of loading Webapp every time, we have placed a fixed Webbrowser control in main panel and loading this control with a new url every time tab changed. :)

Thanks again for your reply.

Regards,

Srikanth

Jul 11, 2012 at 10:49 AM
Cca has a web application adapter, that you configure with the base URL you need on the crm server side. Then in the adapter, responding to events via the do action process or notify context change process, you can navigate the browser using the browser.navigate command.

There are several examples of this in cca and in the uii samples.

Sent from my Windows Phone

From: ansrikanth
Sent: 7/10/2012 12:08 AM
To: mattb-msft@hotmail.com
Subject: Re: Changing HostedWebApplication URL dynamically [crmcca:361771]

From: ansrikanth

Hi Matt,

Thanks for the reply. But we found some alternate for this. Instead of loading Webapp every time, we have placed a fixed Webbrowser control in main panel and loading this control with a new url every time tab changed. :)

Thanks again for your reply.

Regards,

Srikanth