In Unified Service Desk (USD) for Microsoft Dynamics CRM it is not possible to create a session from an in place navigation rule. Or is it????

In Place and Popup Routes Explained

Here I will try to explain the logic behind how these routes work, if you aren’t interested you could jump straight to the solution section. But if like me you like to understand why and how things work please read on.

I’ll start with the science bit, there are two types of routes in USD. In place and popup. An in place route is triggered when the browser window is opened “in place” of the current window. This happens, for example, when you load a case from a sub grid on a contact form. Or in fact any existing record anywhere on any form!

A popup route happens when a “popup” occurs. Obviously! This typically happens when a new record is opened from an existing one or if you open an existing record from a list view.

It is common in Unified Service Desk to want to start a new session when a popup occurs. Although this isn’t always the case. It is therefore possible, with the help of a window navigation rule, to create a new session or route the new window to a tab when a pop up occurs.

The default behaviour of an in place route is to open the window within the current tab, essentially overwriting what the user is currently viewing. The default behaviour will happen if you have no windows navigation rules. (or you have loads and USD can’t find an appropriate one!) It is common to create a window navigation rule that opens the record in a new tab using a “Route Window” action.

It will therefore also be common to cover all eventualities by having two window navigation rules for each entity, one for each route type. For example, if I open a case from a sub grid on a contact form that will trigger an in place navigation. But if I click the “+” to create a new case that will trigger a pop up navigation. In this situation I would create two rules, one for in place and one for popup. But both could have the same action of “route window”. As in both circumstances I might want to open the case form in a new tab in the existing session.

Your navigation rule will typically look something like this …..

It is NOT possible to add a create session action to an in place route. Meaning it is not possible to open a new session when an existing record is selected from a sub grid on a form. Or is it????

Let’s imagine that you have a list of recent cases on a contact and instead of opening one of those in a new tab you would rather start a new session. How could that be achieved? If you took the navigation rule above and simply changed “Route Window” to create session this would not work. The rule would then be invalid and would be ignored. The most likely result would be the default action would be applied. Meaning the case would load in the existing tab. Or worse still you could find that another rule matches this navigation and something completely unexpected and strange happens!

Don’t forget the order of navigation rules is VERY important. USD evaluates them in order and will fire the first rule that matches the route being requested. Meaning a common problem when something strange happens will be the sequence of your rules is incorrect.

The solution

After that lengthy explanation I will now turn to the solution. At last!

I will demonstrate the solution with an example. As I’ve already mentioned cases loading from contacts let’s stay with that theme. I will therefore show how an in place navigation can create a new session. With smoke, mirrors and trickery is the answer!!

The steps are this ….

  1. Create a hosted control
  2. Create a popup action
  3. Create an in place navigation rule
  4. Create a popup navigation rule

Step One – Create a hosted control

This may seem strange! I initially attempted this solution without a hosted control but I found the replacement parameters I needed weren’t available without one. But in my example I didn’t want to show the case in the original session. So I created a “dummy” hidden hosted control.

Field Description
Name This could be anything but I opted for simply calling this control “Hidden”.
USD Component Type CRM Page
Hosting Type IE Process (I always use IE process!)
Application is Global Not selected as this will be a hidden tab in your session
Display Group Hidden

Step Two – Create a popup action

You will need to create an action that will force a popup. We have two possible actions to load url’s in USD. Navigate and Popup. Navigate loads the url in the current tab without triggering the window navigation rules. Popup however will evaluate the window navigation rules are therefore can load the record in a new tab. (Or even session!)

Field Description
Name Hidden – Popup (URL)

Obviously you could use any name you liked!

Order Blank as I only need one action, so the order isn’t important here
Hosted Control Hidden, this is the name of the hosted control we created in step one.
Action Popup
Data url=[[URL]]

The [[URL]] replacement parameter contains the url which needs to be loaded.

FYI: I think [[hidden.url]] would also work in this example! But I went with [[URL]] simply as it is a shorter name!

Step Three – Create an in place navigation rule

Now for the smoke and mirrors bit!

We are going to need an in place navigation rule.

Field Description
Name Case from Contact
Order 1 as that works for me!
From Contact

This is the name of the hosted control in which we are loading the case. In this example contact.

Entity incident

The schema name of the entity we are loading. So incident!

Route Type In place
Destination Tab
Action Route Window

I know we really want to create a session! But for now the action is route window.

Target Tab Hidden

This is the name of the hosted control we created in step one.

Show Tab Left blank, you can’t show a hidden tab!!!

Having saved the nvatigation rule I then added the popup action we created to the rule. As shown below.

Step Four – Create a popup navigation rule

Now we come to the navigation rule that will finally create our session. The previous in place rule will have triggered a popup action. Doing so will make USD look at the navigation rules again. When it does this second rule will come into play. This time using a Popup route and a create session action.

Field Description
Name Case from Hidden (Popup)
Order 1 as that works for me!
From Hidden

This is the name of the hosted control we created in step one. The popup action is triggered from that hosted control.

Entity incident

The schema name of the entity we are loading. So incident!

Route Type Popup
Destination Tab
Action Create Session
Target Tab Incident
Show Tab Incident

Target tab and show tab are set to incident as in my example I wanted to open a session based on the case.

I hope you have found this explanation and example useful. My intention was to not only show how to create a session from an in place route but to also explain the workings behind my approach. Fingers crossed I have achieved that aim.
J

9 responses to “USD – Create Session from “In Place” Route”

  1. Hi Sir, Thanks for writing this post, as using this solution finally I was able to open links on CRM page to new tab as well as in the form of session, the best part is the solution provided here, not just work for existing record rather the same approach works equally correct for “New CRM page”. Feeling to be on seventh heaven 🙂 🙂 🙂

    Like

    1. No problem, I enjoying writing it. 🙂

      Like

  2. Just one clarification in above…I click “save & close” on the ribbon of Activity form like task activity then this strange behavior occurs

    Like

    1. What do you mean by “strange”? With earlier versions of USD using save&close or mark as complete on activities did cause some issues. As the CRM page used to close but the tab remain open. That was fixed in a earlier release. What happens now is you will be prompted to close the window and if you do the tab will close. This can look strange if that was the only tab in the session but is technically correct. In past projects I have actually removed these buttons from the CRM forms but they do work now.

      In my last project we left them on the form but felt some user training on the implications of closing the tabs might be needed.

      Liked by 1 person

  3. Thanks for sharing info. sir, I wasn’t aware that its a USD version related issue & by strange I simply means if I click on “REFRESH” button i expect USD to refresh my CRM page which its not happening in some of the scenarios which i found & mentioned in my last comments…………….Anyhow Thanks again for sharing valuable knowledge 🙂

    Like

  4. Hi Neil,

    How are you?

    I write to you I can lend a hand with a proble of navigation rules please

    i tell you.. I created a navigation rule that makes a new session is created when we receive an Information Call a contact that exists within crm, yhen you are creating the sesion details contact opens and also a call script shown.

    that is what happens to me…..sometimes the navigation rule jumps doing well all the steps and sometimes not, if not skip the navigation rule by not jumping events and when I look at the parameters of context information contact comes empty.

    would come out to give me a clue that may be happening?

    it happens also with the operation of other rules of navigation, it is as if everything depends on contacting the first time you load does not recognize and therefore does not skip the navigation rule.

    Greetings and thanks for everything

    Like

    1. Hi

      Thanks for the message, it is very hard to be sure of what your problem might be without knowing the details of your navigation rules. Send me more details if you need!

      But the first thing I would look at is the version of USD client and CRM solutions you are using. I say this as I saw a similar problem with an earlier version of USD. Make sure you are using the latest client. 2.1.0.556 (I think!)

      Next try reading this post as it might give you some pointers.

      USD – Window Navigation Rules Theory

      Hopefully this helps but if not please contact me again with more detail.

      Neil.

      Like

Leave a comment

Trending

Website Powered by WordPress.com.