Share via


Move hosted controls between panels at runtime

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2013, Dynamics CRM 2015, Dynamics CRM 2016

Unified Service Desk provides the ability to move applications between panels at runtime. You can do so by using the MoveToPanel action for the Global Manager hosted control type. This action takes two parameters:

  • app: name of the hosted control to be moved.

  • panel: target panel for the hosted control.

This can also be done through code where developers can program this while creating new panel types. Unified Service Desk provides a special panel called the Unknown panel. This panel is a temporary storage for hosted controls when the panel layout they were intended to be placed on, is not yet loaded. Let’s suppose that you have a Horizontal Split panel populated with a Dynamics 365 Page type of hosted control, but you have closed your Horizontal Split panel. The Dynamics 365 Page hosted control is still loaded but has been moved to the Unknown panel, which is not visible. Once the Horizontal Split panel is loaded again, the Dynamics 365 Page hosted control would be moved from the Unknown panel to the appropriate panel again.

IDesktopFeatureAccess desktop = AifServiceContainer.Instance.GetService<IDesktopFeatureAccess>();
if (desktop != null)
{
   desktop.SendApplicationToUnknownPanel(this, tabApp);
}

The IDesktopFeatureAccess class has another function, MoveApplicationToPanel, which allows you to move a hosted control from and to arbitrary panels. This function takes a reference to the hosted application you wish to move and a string that represents the panel name, which is the name of the hosted control defined as a panel layout.

See Also

Panels, panel types, and panel layouts in Unified Service Desk
Global Manager (Hosted Control)
CRM Page (Hosted Control)

Unified Service Desk 2.0

© 2016 Microsoft. All rights reserved. Copyright