CRM Page (Hosted Control)
Use the CRM Page hosted control type to load a URL or page from model-driven apps. When a model-driven apps page is loaded within a hosted control of this type, it will automatically scan the page for data from the entity, and automatically populate the replacement parameters.
This hosted control type exposes a number of predefined UII actions and events that are unique to handling of windows including list manipulation actions, and a find action for displaying a quick search or advanced search page
Create a CRM Page hosted control
While creating a 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 information about the specific fields that are unique to the CRM Page hosted control type. For detailed information about creating a hosted control, see Create or edit a hosted control.
In the New Hosted Control screen:
Under Unified Service Desk area, select CRM Page from the Unified Service Desk Component Type drop-down list.
Select Pre-fetch Data to load related information for an entity record in the context along with the entity record page without having to wait for the full entity web page to load in the client application. The fetched entity information is populated in the Unified Service Desk context thus enabling any hosted control to quickly display relevant entity information on the client application. This could help agents instantly act or kick start discussion with customers, and save crucial interaction time.
From the Allow Multiple Pages drop-down list, select No (default) to replace the model-driven apps page that is currently displayed, and update the browser history when Unified Service Desk receives a navigate action call or a page is routed to the tab. Select Yes to automatically create a drop-down list when a second URL is called or a window navigation rule directs a page to the tab. This will allow the user to quickly search between the model-driven apps page that are attached to this control. Also, when you select Yes, an additional field, Maximum Browsers, becomes available where you can specify the maximum number of pages to be displayed in the drop-down list.
The Hosting Type drop-down list specifies how you want this control to be hosted. You can choose Chrome Process . For more information, see Select a hosting method for hosted controls.
Under the Common Properties area, select the Application is Global check box to set the hosted control as global. Global hosted controls can be displayed outside of a customer session. Controls like the agents’ dashboard, wall or search are common uses for global hosted controls. Global hosted controls do not have session-specific state so when you change sessions, these same global hosted controls remain. If the check box is not selected, the hosted control becomes session based. Session-based controls exist in the context of the customer session. If the user changes to another session, all the session pages from the previous session are hidden.
The Display Group field displays the panel where this hosted control will be displayed. MainPanel is the most common for this hosted control type. For information about various panels available in Unified Service Desk, see Panels, panel types, and panel layouts in Unified Service Desk.
For information about other General fields, see Create or edit a hosted control.
Predefined UII actions
These are the predefined actions for this hosted control type.
This action loads a specific associated view of model-driven apps. These views are typically accessed by selecting down arrow next to an entity record name in the nav bar, and selecting the associated entities.
|navItemName||The associated entity that you want to display. Example: Cases|
|Id||The ID of the main entity record for which to display the associated entity records.|
|tabset||The area in model-driven apps. Examples: areaSales or areaService.|
For more information about using this action, see step 5 in Walkthrough 7: Configure agent scripting in your agent application.
This action is used to close the hosted control. Unlike the CloseActive action, if this tab (hosted control) is displaying more than one page, it will close all the pages displayed in the tab in your agent application.
This action is used to close the active window within this hosted control. If the active window is the only window displayed in the hosted control, the hosted control itself will be closed. For CRM Page type of hosted controls that do not allow multiple pages (Allow Multiple Pages = No), this action is equivalent to the Close action.
This action closes the hosted control, but prompts the user to save or abandon the changes before closing.
This action disables the specified toolbar button on the toolbar in your agent application.
|Name of the toolbar button to disable.|
This action enables the specified toolbar button on the toolbar in your agent application.
|Name of the toolbar button to enable.|
Navigate to the quick find list view of the specified entity.
|The data parameter should specify the entity logical name of the quick find list view to display. There are some special case values:
- Use case or incident to display the quick find list view for cases.
- Use advfind to display the advanced find view.
- Use activities or activity to display the quick find list view for activities.
Fires a user-defined event from this hosted control.
|name||Name of the user-defined event.|
All subsequent name=value pairs become the parameters to the event. For more information about creating a user-defined event, see Create a user-defined event.
This action is used to retrieve the selected IDs from the lists.
|The data parameter should specify the list name to capture the selected IDs.|
The return value contains a semi-colon delimited list of IDs containing the selected items.
This action retrieves the number of items that are selected. Use the GetSelectedIds action to get the actual list of IDs for the entity.
|The data parameter should specify the list name to retrieve the selected IDs.|
The return value contains a number represented the quantity of selected items.
This action goes to the initial URL specified for this browser instance.
This action is equivalent to clicking the back button on the browser instance.
This action is equivalent to clicking the forward button on the browser instance.
This action loads a specific area from model-driven apps. This is equivalent to selecting an area in the navigation pane (such as Sales, Service, and Marketing). The only parameter is the name of the area to click. For example: areaService.
|frame||The name of the frame to affect. If no name is specified, it will automatically target the first frame found on the page.|
Displays the Common Data Service platform lookup information dialog box to allow you to select an entity from a list.
|AllowFilterOff||“0” or “1” to allow the user to turn off the filtering|
|DefaultType||The Logical Name of the default display. This should be one of the numeric values specified in the objecttypes parameter.|
|DefaultViewId||“0” or “1” to show the default view|
|DisableQuickFind||“0” or “1” to show the quick find field|
|DisableViewPicker||“0” or “1” to show the view selector|
|LookupStyle||Single or Multiple|
|ShowNewButton||“0” or “1” to show new button|
|ShowPropButton||“0” or “1” to show properties button|
|Browse||“0” or “1” whether to use browsing mode. The following is with this set to “1”.|
|Currentid||The Guid for the current value|
|objecttypes||List of object types to display. Example: “1,2” to display accounts and contacts.|
This action moves a CRM Page hosted control to a different panel at runtime.
|The data parameter should specify the target panel name to move the hosted control to. For example:
This action is used to navigate to a model-driven app url.
|url||The URL to navigate to. This is a mandatory parameter.|
|Noscan||If this parameter is supplied and True, the data parameters will not be captured from the page.|
|HideCommandBar||If this parameter is supplied and True, the inner frame will be displayed without loading the model-driven apps command bar.|
|HideNavigationBar||If this parameter is supplied and True, the form will be displayed without loading the model-driven apps navigation bar.|
|Frame||When frames exist on the page, this parameter would specify the name of the frame to navigate, rather than navigating the main window.|
|postdata||Data that is sent to the server as part of an HTTPPOST transaction. A POST transaction is typically used to send data gathered by an HTML page. In Unified Service Desk, this data can be received from any event triggered using "https://event/?". Example:
Alternatively, the data can be passed as an encoded string with its header type in the intended format.
|header||A string value that contains additional HTTP headers to send to the server. When the
If a Unified Service DeskPOST event triggers the
Creates a page for creating a new record of the entity specified, and treats the page as a popup from the specified hosted control. The window navigation rules are evaluated to determine the location where the page to create the entity record is displayed.
|LogicalName||The logical name of the entity for creating a new instance.|
The rest of the parameters should consist of name=value pairs. These are the additional pre-populated values in the form for creating a new record for the specified entity. For more information about using this action, see step 4 in Walkthrough 7: Configure agent scripting in your agent application.
Opens an existing instance of the entity specified 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 displayed.
|LogicalName||The logical name of the entity to open.|
|id||The ID of the entity record to open.|
Pops up a URL from the hosted control and runs the window navigation rules against it for routing the popup to the appropriate location.
|url||Routes a popup from this hosted control using this URL as if it were a popup requested from the displayed control.|
|frame||The frame from which this popup originated.|
Displays the hosted control at the specified location on a monitor. You can display hosted control on up to two monitors. This action is applicable for hosted control instances that are configured to be placed on a USDFloatingPanel or USDFloatingToolPanel panel type.
|screen||Specifies the screen on which to display the hosted control. Valid values are 1 or 2. If you don’t specify this parameter, 1 is passed by default.|
|left||Specifies 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 specify this parameter, 0 is passed by default.|
|top||Specifies 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 specify this parameter, 0 is passed by default.|
|width||Specifies the width, in percentage, of the hosted control window on the target monitor. Valid values are 1 through 100. If you don’t specify this parameter, 100 is passed by default.|
|height||Specifies the height, in percentage, of the hosted control window on the target monitor. Valid values are 1 through 100. If you don’t specify this parameter, 100 is passed by default.|
This action refreshes the current page.
This action takes the currently displayed URL, and sends it through the window navigation rules from the current hosted control as a popup.
This action explicitly sets the width and height of the hosted control. This is particularly useful when using "auto" in your panel layouts.
|width||The width of the hosted control.|
|height||The height of the hosted control.|
This action saves the dirty data on the model-driven apps form, and closes the hosted control.
This action saves all forms in hosted control that allows multiple pages to be displayed (Allow Multiple Pages = Yes). If the hosted control allows only a single page to be displayed (Allow Multiple Pages = No), this is equivalent to the Save action.
This action saves the current CRM Page.
This action collapses or expands the ribbon. If you hide the ribbon in the Navigate action, it will not be displayed and this action does not work. This action will work only when the ribbon was initially loaded.
This action collapses or expands the navigation pane on the left panel of the model-driven apps window. The navigation must contain a navigation panel for this action to work.
The following predefined events are associated with this hosted control type.
Occurs when the active hosted control is closed using the CloseActive action.
|url||The URL that was displayed in the hosted control when it was closed.|
Occurs when the page has finished loading. On a CRM Page type of hosted control, this event occurs after the data 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 the page that has finished loading.|
Occurs as soon as the related information for an entity record is loaded in the Unified Service Desk context. This event occurs before the BrowserDocumentComplete event. If the Pre-Fetch Data option is selected for the control instance then this event occurs as soon as the entity data is fetched in a separate parallel call to the server and will not wait for the full page to finish loading. The entity data is pre-fetched and the DataReady event is fired for inline navigations as well.
Occurs any time when a frame has completed loading. This event can occur multiple times per page load when an iFrame or frame is used on the page. This event corresponds to the individual BrowserDocumentComplete events in code.
|frame||The name of the frame that finished loading, if available.|
|url||The URL of the frame that finished loading.|
Occurs after a popup has been routed by the system.
|url||The URL of the popup that was routed.|
Occurs when refresh is requested on the current page. Refresh can be requested either by pressing the F5 key or calling the Refresh action by the application.
|url||The URL displayed when refresh was requested.|
Occurs after a record in the model-driven apps page is saved.
|newId||The ID assigned to the newly created record.|