USD – Prevent users from closing a tab

By default USD tabs have an “x” which allows the user to close the tab. But sometimes you want to prevent this from being possible. I have commonly used this in two situations;

  1. You may have a global tab that opens when USD loads, if this tab is important you may want to force it to always be present.
  2. Within a session on accounts (for example) you might want to prevent the user from closing the tab for the account that the session is based on.
Lets assume I want to prevent a global tab called CRM from closing.

Step One – Create (if needed) a user can close uii action

Navigate to the uii actions on the hosted control which you wish to prevent from closing. Look for an action called “SetUserCanClose”

Hopefully one exists but if it doesn’t you may need to create one.

Step Two – Add an action

Within the actions area of the Unified Service Desk settings now create an action that will be used to prevent the close.

Name = “CRM – User Can Close”

Hosted Control = “CRM”, this is the name of the hosted control / tab you would like to prevent from closing.

Action = “SetUserCanClose”, this will be the action you created in step one.

Data = “UserCanClose=false”



Step Three – Trigger the action you created
In this example, because we are using a global tab, the action must be added to the global container hosted control. Achieved by adding the action into the DesktopReady event of the global container.

Note: If the hosted control is a session based control the action will need to be added to the windows navigation rule used to open the session.

3 thoughts on “USD – Prevent users from closing a tab

  1. Pingback: Learning USD | My experiences with Microsoft Dynamics CRM

  2. Pingback: USD – The Book | Microsoft Dynamics CRM and Unified Service Desk

  3. Pingback: Learning Unified Service Desk | Microsoft Dynamics CRM and Unified Service Desk

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s