USD – Open a session from a session

I was recently asked a question about how to open a session in USD from a session, I like answering questions about Unified Service Desk (USD) for Microsoft Dynamics CRM. So here is one possible answer …..

To give an example, I needed to think about this in context of my own USD application. So this answer isn’t an exact mirror of the question but hopefully it could be adapted for other situations.

In my application, whenever I open a contact if they have a parent account I also open that in a tab within that session. I thought it might be useful to add a button to the parent account that would start a new session in context of the account.

Normally when we open an account (or anything) within a session a window navigation rule will be a route type of “in place” and will fire an action of “Route Window”. This will then open the account in a tab within the current session. When it comes to creating sessions the route type will always need to be “Popup” and you will want to fire a “Create Session” action. So how can I achieve the requirement …… actually the answer was pretty simple. J

I’m going to make some assumptions here, firstly that you already have sessions opening in USD. And that within that session you are already able to open a tab containing an entity. In my example, I am opening a session for the contact and I have opened a second tab containing a parent account.

The steps I follow were;

  1. Create an action to close the parent account window
  2. Create an action to pop-up an account window
  3. Add the actions to a toolbar on the parent account
  4. Create a window navigation rule to create the session

Step One – Create an action to close the parent account window

As I was about to allow the user to open a session for the parent account it seemed logical to close the current tab. As otherwise they would have had the parent account opened in two places. Which might feel confusing. This is a pretty simple action. The hosted control in my example was “Parent Account”, as that is the name of the tab holding my account. Then the action is close.

I set my order to 1, as I decided to close the current tab before opening the new session.

Step Two – Create an action to pop-up an account window

As I have mentioned normally when we open an existing entity in USD this will trigger an “in place” route type. In this circumstance though I needed to force the account to popup. Allowing me then to create a session.

My hosted control is “Global Manager”, the idea being global manager is hidden. So no additional tab will show in my current session.

My action is popup. Popup is different to navigate, mainly as calling a Popup account will trigger the window navigation rules. Important as we are going to need these to create our session.

In my example I set the data field to “url=[[Parent Account.url]+]”, you will have a .url replacement parameter on any CRM Page in a hosted control. In my example, this is useful as it is the url of the account I want to open.

I set the order to 10, so that this action would be triggered after the close action I described in step one.

Step Three – Add the actions to a toolbar on the parent account

I already had a navigation toolbar on my parent account tab, so I simply created an additional button to call the two actions I just described.

So clicking the button would close the current tab and open a new session for that account. My button looked like this ….

Step Four – Create a window navigation rule to create the session

Next I needed a window navigation rule to trigger opening a session from an account popup came from my parent account tab. My rule looked like the one below.

You can see that I set my “from” to “Parent Account”. (If I had used the variation I mentioned of triggering the popup from global manager I would have set the from to global manager!)

The entity I am opening is account, my route type is popup. And my action is “Create Session”. And finally the target and show tabs are set to account.

To show this change in action I have created a very quick video ….

Hopefully this post has answered the question I was asked and shown the change in action. J

7 thoughts on “USD – Open a session from a session

  1. Hi Sir,

    1.) The solution which you provided here is good, but to reduce agent’s efforts to great extent, I want when a call center agent clicks on any of the “Look up” hyperlink on the case form (case form opens into a session in my USD application), it should open into a new tab (like policy & policy member).

    2.) I also want when I click on any specific case from Recent cases grid from the same case session form, it should open into a a new tab.

    I hope these things are manageable through Window navigation rule. Isn’t it.

    But I saw a default “Inplace” Route type window default navigation rule trigger in my USD, not my navigation rule created for this purpose.


    • Hmmm … you are demanding! Hahah.

      I think something is possible but I am working away so I can’t test. Let me know how you get on.

      It will not be possible to open cases clicked on the contact form in two different ways. But you could open cases from the associated case view in the existing session and cases in sub grids on the contact in a new session.

      But you are going to need to be creative with navigation rules!!!

      Clicking in associated view and directly from the contact will both trigger an in place route. You need a popup to create a session. But don’t worry, we can get round that. I think!

      Create three navigation rules, first will be an in place route with an action of route window. On this set the from to be the hosted control for your associated cases. You might have this rule already.

      Next create a popup route that will open a session for the case. Like I did in my blog with the from being global manager.

      Now the clever one. Create a third rule that is again an in place route. With the from as the contact form. In this set the action to none. And leave show / target tabs blank.

      Create an action that does a popup from global manager. The url will be the one that is shown in the navigation rule in debugger. From memory I think it is something like [[SUBJECTURL]]

      Add this action to the third navigation rule. By doing this the in place route with the case form will do nothing But it will trigger a popup which will then get into a session.

      I hope this makes sense. If not I will need to create an example for you. But I can’t do that until the weekend.

      Hope this works.



  2. Pingback: USD – Window Navigation Rules Theory | Microsoft Dynamics CRM and Unified Service Desk

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

  4. Hi Sir my self is Kranthi Kumar, we have requirement that to open a session on click of menu bar button and load some external page in that session. Could you please help me out.


    • If I am reading this right you want to start a session directly from clicking a toolbar button.

      I think “trick” will be to use a popup action rather than a navigate action. As a navigate action will not trigger your window navigation rules.

      If that doesn’t work you can call a create session action from global manager. That would open the session and then you could navigate to tabs within it. (FYI: I know the theory of this but I haven’t fully implemented so I’d need time to test!)

      I am about to go on holiday for a couple of weeks. However if you need more help with this let me know and I will create a detailed blog post. Except that will be in two or three weeks!!!

      If you do need more information please respond back with greater detail on your requirement.


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