USD – Show Associated Cases

I was recently asked a question about Unified Service Desk (USD) for Microsoft Dynamics CRM. This time the question was about showing associated views.

I have previously completed a post on this topic. You can view is here.

My previous post, whilst detailed, didn’t use a common real world example I think this might have been slightly confusing. So to help remove any confusion I decided to repeat the post but in terms of associated cases for a contact.

I am going to assume that you already understand the basics of USD. And that you have been able to create a session for the contact already.

This change is simple enough but is in two parts, firstly you will want to open a tab to show cases associated with the contact. Then if someone clicks on one of those cases you will want to open that in a tab. My solution contains quite a bit of additional functionality! I will keep this post very much focused on the associated view for cases. (But I might hint at a few additions for could consider along the way.)

The steps involved are;

Part One – Associated case view

  1. Create a hosted control for the associated view.
  2. Create an action to show associated cases.
  3. Create a toolbar and button.

Part Two – Open a case from the associated view

  1. Create a hosted control for the case.
  2. Create a window navigation rule.

PART ONE – Associated Case View

Part one was to create a toolbar button on my contact that would display a tab containing an associated view of cases.

Step One – Create a hosted control for the associate view

This step is simple enough. I am going to need a hosted control (tab) to show my associated cases in. The screen shot below shows my case associated view in the left panel.

I won’t describe in detail here! But notice I have also added a toolbar to my Cases associated view. The toolbar included home, back, forwards and refresh buttons. Simply as I like to continue to support a browser like experience for the user. To be honest home, back and forwards in this context don’t add much! (But my toolbar is generic and I commonly apply it to all my tabs.) The refresh button is useful as this allows the user to refresh the view should any new cases be created since they opened the tab. Also, note the “<” and ” >” icons. I use these to move the tab. I have MoveToPanel actions that will allow the user to move the tab to LeftPanelFill or MainPanel.

Creating the hosted control is easy. Mine looked like this ….

A few things to note ….

Field Description
Name Associated Cases
Display Name Cases
USD Component Type CRM Page
Allow Multiple Pages No
Hosting Type IE Process
Application is Global Not selected
Display Group LeftPanelFill

LeftPanelFill is the left panel area just below your agent scripts. As I showed above. If you prefer you could use MainPanel if you’d like the associated view to be larger.

User Can Close Selected

Step Two – Create an action to show associated cases

Next I will want an action to display the associated cases in the tab I have just created. My action to do this look like this;

Field Description
Name Associated Cases – Associated View (From contact)
Hosted Control Associated Cases
Action AssociatedView
Data navItemName=incident




This example is for cases from a contact. Obviously you may also want to show cases from account. To do that your data portion would look like this.





To explain …..

  • navItemName – This is the schema name of the entity you want to display in the associated view.
  • Id– This is the name of the GUID which links the two entities together.
  • tabset– This is the name of the relationship between the two entities. (You can find this by looking at the entity relationships in customizations.)
  • type – This is the type id (etc) of the calling entity. (1 for account, 2 for contact.) If you are working with a custom entity you can see etc= in its url.

Step Three – Create a toolbar

Next you will need a toolbar and button on the contact to display cases. Below you can see mine.

Notice that my toolbar actually has quite a few icons. Obviously in this post we are only interested in the display of associated cases. But to give you some ideas I have toolbar buttons to display associated opportunities and connections as well as cases. Plus a few bells and whistles like displaying maps, LinkedIn integration, send emails etc etc. (For now, let’s stay focused on viewing associated cases!)

Clicking on my “spanner” icon gives me two options, one to view cases and another to create a new case. It is the view cases option that will display my associated view of cases.

To achieve this effect, I firstly needed a toolbar that I could associate with my contact hosted control. So I created a toolbar and added some buttons.

First of all, you will create a toolbar, simply by giving it a name. I called mine “Contact Navigation Toolbar”. Next will associate this toolbar with you contact hosted control To do that we use the hosted control option in the navigation bar of the toolbar.

Below you can see that I have added my contact hosted control onto my contact navigation toolbar.

Once I’d done this I proceeded to add all of the buttons I required. Below you can see that I actually added 7 buttons. But it is simply my button to display cases we are interested in today.

My button view cases looked like this. All this does is call the action we created in the previous step to display associated cases.

Note: As you have seen I also had a button to allow my users to create a new case. But I am not going to cover that in this post!

In my application it is possible to create new contacts, it isn’t valid to try to display an associated view of cases until the new contact has been saved, to cope with this I added and “Enabled Condition” and “Visible Condition” to control this.

PART TWO – Open a case from the associated view

Now I had my tab coming up containing cases associated with the contact I wanted the user to be able to click one of these cases to open it.

Step One – Create a hosted control for the case.

You may already have a hosted control for cases but if not you will need to created one. My hosted control for cases looked like this;

A few things to note ….

Field Description
Name Incident
Display Name Case([[$Scriptlet.ResolveCaseNameTitle]])

I won’t cover this in detail here! I had a scriptlet that helps me name the cases tab. If you wanted a simpler solution then enter something like:


USD Component Type CRM Page
Allow Multiple Pages No
Hosting Type IE Process
Application is Global Not selected
Display Group MainPanel

Step Two – Create a window navigation rule.

Having created a hosted control to hold my case I needed a window navigation rule to govern how that tab would load. My window navigation rule is shown below;

A few things to note ….

Field Description
Name Case from Associated Cases
Order 1

You might need a different order! Keep in mind the way window navigation rules work. As they are evaluated in order and the first matching rule will be the one selected. 1 worked fine for me, you might need to play with this!

From Associated Cases

This is the associated cases hosted control we created in part one.

Entity Incident

The schema name for cases!

Route Type Popup
Destination Tab
Action Route Window
Target Tab Incident
Show Tab Incident
Hide Navigation Bar Yes

I do this as I like to restrict the options available to the user. But you can leave this at “No” if you prefer.

I have shown the end result below, clicking on the case in my associated view opens a tab which contains the case.

Note, if you also show cases for accounts this one navigation rule will probably work for both!

Notice that I have also started an agent script to help the user handle the case. And my case has a toolbar. (This includes a search icon which likes to the CRM knowledge base.) I only mention these things to give you some ideas! As this post has a focus on just the cases associated view.

I hope you will have found this post useful if trying to use the associated view logic in USD.

One thought on “USD – Show Associated Cases

  1. Pingback: USD – The Book | 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