Use the CRM Dialog hosted control to work with the Dynamics 365 dialogs. You can call the StartDialog action on your Microsoft Dynamics CRM Dialog hosted control to start a Dynamics 365 dialog within the Unified Service Desk.
Create a CRM Dialog hosted control
While creating the new hosted control, the fields in the New Hosted Control screen vary based on the type of hosted control you want to create.
This section provides the data about the specific fields that are unique to the CRM Dialog hosted control type.
In the New Hosted Control screen:
- Under the Unified Service Desk area, select CRM Dialog hosted control from the USD Component Type drop-down list.
- The Hosting Type drop-down list mentions how you want this control to be hosted. You can select the Internal WPF (default) or IE Process.
- Under the Common Properties area, select the Application is Global check box to set the hosted control as global. Global hosted controls can be shown outside of a customer session. Controls like the agents’ dashboard, wall or search are common uses for the global hosted controls. Global hosted controls do not have a session-particular state so when you change sessions, these same global hosted controls remain. Session-based controls exist in the context of a customer session. If the user changes to other sessions, all the session pages from the previous session are hidden.
- The Display Group field shows the panel where this hosted control will be displayed. MainPanel is common for this hosted control type.
Predefined UI actions
These are the predefined UI actions for this hosted control type.
This action is used to close hosted control.
Fires a user-defined event from this hosted control.
|name||Name of the user-defined event.|
All the subsequent name=value pairs become the parameters to an event.
This action is used to move the hosted controls between the panels at the runtime.
|app||Name of the hosted control is to be moved.|
|panel||Target panel for the hosted control.|
Creates the page for creating a new Dynamics 365 record of an entity specified, and treats the page as the popup from the mentioned hosted control. The window navigation rules are evaluated to determine the location where the page to create the entity record is shown.
|LogicalName||The logical name of the entity for creating a new instance.|
Opens the existing instance of the entity mentioned and identified by the ID, and treats the page as a popup from the specified hosted control. The window navigation rules are evaluated to determine the location where the popup should be shown.
|LogicalName||The logical name of the entity to open.|
|id||The ID of an entity record to open.|
Pops up the URL from the hosted control and runs the window navigation rules against it for routing the popup to appropriate location.
|url||Routes popup from this hosted control using this URL as if it were the pop-up requested from the displayed control.|
|frame||The frame from which this popup originated.|
Shows the hosted control at the specified location on a monitor. You can show the hosted control on up to two monitors. This action is relevant for all the hosted control instances that are configured to be placed on a USDFloatingPanel or USDFloatingToolPanel panel type.
|screen||Mentions the screen on which to display the hosted control. Valid values are 1 or 2. If you don’t mention this parameter, 1 is passed by default.|
|left||Mentions the position, in percentage, from the left of the screen on the target monitor where the hosted control should be displayed. Valid values are 0 through 100. If you don’t mention this parameter, 0 is passed by default.|
|top||Mentions the position, in percentage, from the top of the screen on the target monitor where the hosted control should be displayed. Valid values are 0 through 100. If you don’t mention this parameter, 0 is passed by default.|
|width||Mentions the width, in percentage, of the hosted control window on the target monitor. Valid values are 1 through 100. If you don’t mention this parameter, 100 is passed by default.|
|height||Mentions the height, in percentage, of the hosted control window on the target monitor. Valid values are 1 through 100. If you don’t mention this parameter, 100 is passed by default.|
This action explicitly sets the width and height of a hosted control. This is particularly helpful when using “auto” in your panel layouts.
|width||The width of the hosted control.|
|height||The height of the hosted control.|
This action takes several parameters but for the dialogs that do not relate to a particular record, you can just specify the Name parameter.
If you mention the DialogId parameter, it will be used by the action instead of the Name parameter.
|Name||The name of the dialog as seen in the Settings > Process section of Dynamics 365.|
|DialogId||You can also mention the dialog by its ID.|
|Entity||This is the type of an entity that a dialog is to be run against. This is required if you use the DialogId parameter. It is not required if the Name parameter is used.|
|Id||This is the ID of an entity to which a Dialog session applies. If this parameter is not mentioned, the dialog is run against the first entry of the appropriate type in the system.|
When a dialog is completed, it will prompt the user to close the window. If the user affirms, tab in the Unified Service Desk will close as well, which is by design.
The given predefined events are associated with this hosted control type.
Occurs when the page has finished loading. On the CRM Page type of the hosted control, this event occurs after the information has been saved to the replacement parameter list. This event occurs only once, even though multiple frames will have individually fired their BrowserDocumentComplete events.
|url||The URL of a page that has completed loading.|
Occurs after a popup has been routed by a system.
|url||The URL of a popup that was routed.|