Within Unified Service Desk (USD) for Microsoft Dynamics CRM typically each entity in a session loads into one tab. But what if you’d like to open multiple tabs for the same entity? This would be difficult right???? Actually it is pretty simple, as I will explain in this post.
For example, when looking at a contact to load a new tab for each case viewed for that contact.
One complexity for this change will be how to handle operators closing tabs. As if a tab is closed I’d want to “reuse” it should another case be opened.
My approach to this change involved the following steps;
- Create some hosted controls
- Create some actions and add to events on the hosted controls
- Create some window navigation rules
Step One – Create some hosted controls
In my example I will create three hosted controls, one for each tab I’d like to open. You could create more is needed. I called them Incident 1, Incident 2 and Incident 3.
Incident 1 and Incident 2 have almost the same settings.
Field | Description |
Name | Incident 1 (or Incident 2) |
Display Name | [[Incident 1.title]+] (or [[Incident 2.title]] |
USD Component Type | CRM Page |
Allow Multiple Pages | No |
Hosting Type | IE Process (I always sue IE process!) |
Application is Global | Not selected |
Display Group | MainPanel |
If you like you could repeat this logic for more tabs. However, many tabs you have the last one will look slightly different. The final tab will be my catch all. My final hosted control looked like this;
Field | Description |
Name | Incident 3 |
Display Name | Case(s) |
USD Component Type | CRM Page |
Allow Multiple Pages | Yes |
Maximum Browsers | I went for 4 but you could have a higher or lower number as required, |
Hosting Type | IE Process (I always sue IE process!) |
Application is Global | Not selected |
Display Group | MainPanel |
Step Two – Create some actions and add to events on the hosted controls
This next step was to cope with the fact the users could close tabs and I wanted to re-use them. On my incident 1 and incident 2 hosted controls I needed to clear the data parameters if they were closed. So that the tab would be reused.
To do this I created two actions. I have shown the incident 1 action below. My incident 2 “version” is exactly the same! (Note: I didn’t need one for my final tab, so no incident 3!)
Field | Description |
Name | CRM Global Manager – Clear Data Parameter (Incident 1) |
Hosted Control | My global manager …. CRM Global Manager |
Action | ClearDataParameter |
Data | name=Incident 1
Technically more data parameters will exist for each incident. You could create other actions to completely clear the incident details from your context. But I only needed to fire this one action for this change. |
Once I had my actions I needed to add them to an event on each hosted control. The event I needed wasn’t present out of the box. So I created it. Below you can see that on Incident 1 I used the ADD NEW EVENT option and created an event called “Closing”.
Having created the closing event, I added my action to this event.
Meaning I ended up with a closing event on my Incident 1 and Incident 2 hosted controls. And on each I called a ClearDataParameter action.
Step Three – Create some window navigation rules
Finally I needed three window navigation rules to govern the loading of these tabs. (As shown below.)
The order is VERY important here. As I want to load something into incident 1 first, then incident 2 and finally incident 3.
Field | Description |
Name | Case 1 from Contact
Or Case 2 from Contact Or Case 3+ from Contact |
Order | 1,2 or 3 |
From | Contact
This rule was to apply when loading cases from my contact tab. If I had wanted this same behaviour when loading cases from any entity I would have left the from field blank. |
Entity | Incident |
Route Type | In Place |
Destination | Tab |
Action | Route Window |
Target Tab and Show Tab | Incident 1
Or Incident 2 Or Incident 3 |
Hide Navigation Bar | I set this field to Yes, but that is optional. (I jkust like to restrict the navigation in this way!) |
Condition | “[[Incident 1.url]+]” == “”
Or “[[Incident 2.url]+]” == “” Note: I didn’t have a condition in my third navigation rule. This condition is important as it is this that is used to see if the tab is currently being used. If the condition fails, the next navigation rule in the sequence would be used. Until finally the last rule is reached and as that has no condition it would then be selected. |
Once completed I could load cases in multiple tabs as shown below. Including having multiple pages on my final tab. Plus if I closed a case in the first or second tabs, opening another case will reuse that tab.
I hope this example helps you understand how multiple tabs can be used for a single entity in USD.
J
Hello Neil,
Would be great if it was that easy.
Unfortunately it doesn’t work for popup navigation rules. Since USD just disregards the conditions in them.
Did anyone find a good way to implement same for popup rules?
LikeLike
Hi Mike
Are you on latest version of usd? 2.02.440
I found that you were right that earlier versions had a problem with conditions on navigation rules. But I am confident it is working on my system.
Neil.
LikeLike
Really?
I am using the latest version and it doesn’t work for me. Looks like i have to open another incident at Microsoft 😦
LikeLike
Hi Neil,
I tried the version 2.1.0.556 which was released yesterday and it works there!
So you were right it is fixed now. Strage that it doesn’t work in 2.0.2.440 for me but it does for you.
LikeLike
Great proof-of-concept, thanks Neil! Also, thanks for revealing the secret Closing event. I can’t find any evidence of this event in any official USD documentation, and it’s always nice to discover useful new functionality, however it occurs.
LikeLike
Pingback: USD – Window Navigation Rules Theory | Microsoft Dynamics CRM and Unified Service Desk
Pingback: USD – The Book | Microsoft Dynamics CRM and Unified Service Desk