Standard Web Application (Hosted Control)

The Standard Web Application hosted control type is similar to the CRM Page type except that it is intended to be used with non-CRM pages. It uses the sameWindows Presentation Foundation (WPF) WebBrowser component to load the page and provides script injection for relevant features of generic web pages. Like the CRM Page hosted control, these pages can be automated. The preferred method of automating is through JavaScript injection including calling JavaScript functions that are already defined in the page or manipulate the DOM. The RunScript action can also be used to obtain values from the page.

Note

This hosted control type does not support the Hosted Application Toolkit (HAT), which facilitates the task of automating the UI of a hosted application. HAT consists of the data-driven adapters (DDA), descriptive bindings and automations (Windows workflows) to automate the applications. More information: Use UII automation adapter to interact with external and web applications

In This Topic

Create a Standard Web Application hosted control

Predefined UII actions

Predefined events

Create a Standard Web Application 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 Standard Web Application hosted control type. For detailed information about creating a hosted control, see Create or edit a hosted control.

Standard Web Application hosted control

In the New Hosted Control screen:

  • Under Unified Service Desk area, select Standard Web Application from the USD Component Type drop-down list.

  • From the Allow Multiple Pages drop-down list, 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 pages that are attached to this control. If you select No, when Unified Service Desk receives a navigate action call or a page is routed to the tab, it will replace the page that is currently displayed and update the browser history.

  • The Hosting Type drop-down list specifies how you want this control to be hosted. You can choose Internal WPF (default) or IE 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.

  • In the Display Group field, specify a panel where this hosted control will be displayed. For information about various panels available in Unified Service Desk, see Panels.

Predefined UII actions

These are the predefined UII actions available for this hosted control type.

New_CRM_Page

Creates a page for creating a new CRM 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.

Parameter Description

LogicalName

The logical name of the entity for creating a new instance.

Note

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.

Open_CRM_Page

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.

Parameter Description

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.

Parameter Description

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.

Close

This action is used to close the hosted control.

FireEvent

Fires a user-defined event from this hosted control.

Parameter Description

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.

MoveToPanel

This action is used to move hosted controls between panels at runtime.

Parameter Description

app

Name of the hosted control to be moved.

panel

Target panel for the hosted control.

SetSize

This action explicitly sets the width and height of the hosted control. This is particularly useful when using "auto" in your panel layouts.

Parameter Description

width

The width of the hosted control.

height

The height of the hosted control.

This action is used to navigate to a CRM url.

Parameter Description

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.

Hideribbon

If this parameter is supplied and True, the inner frame will be navigated instead, thus avoiding loading the ribbon.

Hidenav

If this parameter is supplied and True, the navigation panel on the left in CRM, will be collapsed after the page is loaded.

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 a 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 "http://event/?". Example: [[postdata]+]

Alternatively, the data can be passed as 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 postdata parameter is used in the Navigate action, you should also specify appropriate value for the header parameter. Example: Content-Type:application/x-www-form-urlencoded

If a Unified Service Desk POST event triggers the Navigate action, the default value of this parameter should be header=[[header]+]

GoHome

This action goes to the initial URL specified for this browser instance.

GoBack

This action is equivalent to clicking the back button on the browser instance.

GoForward

This action is equivalent to clicking the forward button on the browser instance.

RunScript

This action injects JavaScript into the main frame of the application. You should avoid using CRM client SDK calls with this action; instead, use the RunXrmCommand action.

Parameter Description
 

The data parameter is the JavaScript that will be injected into the form.

Note

The replacement parameters can be used in the script, and they will be replaced before the script is executed.

WaitForComplete

This action can be used to block the processing until the URL finishes loading.

Note

Some web pages, particularly CRM pages, have multiple frames. This action waits for only the main frame to complete.

Parameter Description

Milliseconds

Optional parameter to indicate how long, in milliseconds, to wait to timeout.

Predefined events

The following predefined events are associated with this hosted control type.

BrowserDocumentComplete

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.

Parameter Description

url

The URL of the page that has finished loading.

PopupRouted

Occurs after a popup has been routed by the system.

Parameter Description

url

The URL of the popup that was routed.

See Also

Tasks

Walkthrough 2: Display an external webpage in your agent application

Concepts

UII actions
Events
View predefined actions and events for a hosted control
Create or edit a hosted control

Other Resources

Hosted control types and action/event reference

Unified Service Desk
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.