USD – Show associated views.

You may wish to display an associated view in a separate USD tab. Such as associated cases for a contact or opportunities for an account etc.. This can be done by having a navigation toolbar to trigger the associated view.

You will probably also want to be able to click on a row in the associated view and open the details for that item. Such as viewing the details of a case from the associated case view.

The involved steps are;

  1. Create a hosted control for the associated view
  2. Create the toolbar button
  3. Create an action call to show associated view
  4. Create a windows navigation rule to open items from associated view

I am making some assumptions here! I assume you’ve already created a USD session and are therefore ready to add an associated view into it. If you aren’t sure how to create a USD session refer to my earlier post about sessions. I’m also assuming you understand the concept of creating a toolbar. Again if unsure refer to my other posts on toolbars.

Step One – Create Hosted Control for the associated view.

In my example I’m going to stick with my “fishing” theme. (Sorry!) Meaning in this example I will be viewing a fishing location and want to see an associated view of all the lakes at this location. You can obviously display phone calls associated with an account or whatever works for you!

First step will be to navigate to unified service desk in settings, then select hosted controls and add a new control. My example is below.

Things to notice are that the “Component Type” is “CRM Page” and that the “Application is Global” option is not set. (Meaning the tab will show in a session.) Also that the “Display Group” is “MainPanel”.

AssociatedViews 1

Step Two – Create toolbar button.

As I mentioned above, I’m going to assume you know how to create a toolbar. This step is simply about adding an additional button to the toolbar that will trigger the display of the associated view.

Tip: This is just one method of launching the action to display the associated view. Another approach might be to have an “answer” in an agent script that views associated cases etc.

AssociatedViews 2

In my example  needed a button called “Lakes” that will show in the toolbar for fishing locations. You might want a button called “Cases” that will show on accounts.

Some things to note;

  • I’ve added an image of new_Fish32x32 to my button. This is optional but adding icons does improve the feel of the user interface. In some circumstances you can opt to have just an image and leave the button text blank.
  • I’ve set my button test to lakes, as mentioned above this is optional.
  • Order 4, this drives the position of the button in the toolbar.
  • Tooltip, again optional. In my case if you hover the mouse pointer over the button “Show associated Lakes” will display.
  • The Show Tab option is important! Set this to the name of the hosted control you created in step one. Doing so forces focus onto the tab after the button is clicked.

In the screen shot below you can see I’d already added the action “Open Associated Lakes”, creating and adding this action is your next step.

Step Three – Create an action call to show associated view

Before actually creating the action you need to know the relationship name between the two entities and the type number for the entity.

 AssociatedViews 3First off: to get the type number. Open any one of the source entities. In this case the fishing location. (You might be looking at accounts or contacts.) Then use the expand icon to open up the window.

AssociatedViews 4

Now the window is open the type number is the “etc” value in the url. See highlighted 10007 number in screen shot opposite.

Once you’ve got the type number you’ll need the relationship name. To get this go to the customization options under settings. You get the relationship name by looking at the relationships for the source entity. So in my example I’d be looking for the relationship between fishing location and lakes. You might need the name between accounts and cases etc.

Now you have the information needed to create an action like the one below. (And “of course” associate with the toolbar button as shown in the screen shot for the previous step.)

AssociatedViews 5

Notice that the hosted control is associated lakes, the one you’ll have created in step one. And that the action is “AssociatedView”.

The data portion is important, so lets look at each line in turn.

  • “navItemName=new_fishinglake” – This is the schema name of the entity you want to display in the associated view. Yours might be set to case.
  • “Id=[[new_fishinglocation.Id]]” is the name of the GUID which links the two entities together. Yours might be something like [[]]
  • “tabset=New_new_fishinglocation_new….” – This is the name of the relationship between the two entities. You should have found this by looking at the entity relationships in customizations.
  • “type=10007” – This is the type id you should have found before creating this action.

This step might sound complicated but once you’ve got one example working you’ll see that it is pretty straight forward.
Step Four – Create a windows navigation rule to open items from associated view
Finally you’ll need to create a window navigation rule to govern how items selected from the new associated view will display.

This step is optional but without it clicking on a lake would open it in a pop-up outside of USD. As I want a new tab to open then this additional step is significant.

To create the navigation rule, pen the window navigation rule area of unified service desk settings and add a new rule.

AssociatedViews 6

Things to note include;

  • From – The from option is the tab (hosted control) that the rule applies to. So in my case “Associated Lakes” as I want to describe how lakes should open when selected from the associated view.
  • Entity – This is the schema name of the entity you want to open. So in my cases “new_fishinglake”, yours might be “case”. Tip: If you haven’t used this entity before you might need to create the entity name!
  • Route Type – Set this to “Popup”, as you want the tab to “Popup” in the current session.
  • Destination – Set this to “Tab”, as we want the popup to display in a tab.
  • Action – Action is route window, this keeps the tab in the current session.
  • Target Tab and Show Tab – Both of these options are set to the name of the hosted control for the entity you want to display. In my case Fishing Lake. If this is the first time you’ve displayed this entity in a tab you may need to create a new hosted control.
  • Options – The options govern what toolbars you require. In my example I’ve not hidden the command bar, meaning I can select options like “New” to create a new lake. But I have hidden the navigation bar. Effectively preventing the user from navigating away from this entity. You might need to play around with which combination works best for you. But hopefully you’ll find the approach I’ve taken is quite logical!

9 thoughts on “USD – Show associated views.

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

  2. Pingback: USD – Case Toolbar, create and view | Microsoft Dynamics CRM and Unified Service Desk

  3. Pingback: USD – Case Toolbar, create and view - Microsoft Dynamics CRM Community

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

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

  6. Could you please share screen shot of how USD looks like after finish this topic. I have created a button in the tool bar when i click the button, associated lakes not display because i don’t know how is passed


  7. Pingback: USD – Show Associated Cases | Microsoft Dynamics CRM and Unified Service Desk

  8. Pingback: USD – Show Associated Cases - Microsoft Dynamics CRM Community

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