Tag Archives: popup

USD: How to get records of the same type on different tabs?

My apologies in advance because I can’t show detailed screenshots; I work at a financial institution, so you get the drift. I’ll try to be as clear as possible, though.

In our implementation, we need to show different Account records (this is a custom entity, not the CRM default) in separate independent tabs when selected from the Contact form sub-grid. The problem here is that the default CRM behavior is to put all the records in the same tab and then provide a dropdown that allows you to select which record you want to view.

No bueno. So how do you get CRM to show each record in its own tab within the current session?

You need to create as many Hosted Controls for the entity as you might need to show individually. In our case, we’ve determined that users have around three tabs open on average, so we went ahead and created five Hosted Controls for our Account entity. It’s very important that they have distinct names, so they were named “Account 1”, “Account 2”, etc.

Easy enough, we’re halfway there. Here comes the mildly tricky part. You need to create as many Window Navigation Rules as you have Hosted Controls. So that means in our case, five WNRs. Here are the details on what to put in the fields:

  • General
    • Name: Make sure you use a sequence here that matches the HCs description for clarity’s sake.
    • Order: This is crucial. This determines how the USD will go through an elimination process to determine where to pop-up your page.
  • Route Logic
    • From: The entity from where you’ll be showing these records. In our case, Contact.
    • Entity: The Entity Type you will be displaying.
  • Result
    • Route Type: In Place
    • Destination: Tab
    • Action: Route Window
    • Target Tab: The name of the corresponding hosted control. So if this is “WNR MyEntity 1”, the HC would probably be “MyEntity 1”. Something along those lines.
    • Show Tab: Same deal as above, if you want the USD to switch to that tab automatically.
    • Options: Set these two as you prefer.
  • Advanced
    • Condition: This is the cool part. You will type in this:
      • "[[HostedControlName.url]+]" == ""
        • Make sure you include the double quotes as shown.
        • Replace HostedControlName with the name of the HC you will be pointing at, which is the same as the Target Tab above.
        • You will not place the condition in the last WNR. Leave it blank.

How does this work? The USD will check the condition for presenting the record based on the first WNR rule set for the entity. It will check for the URL of the related hosted control. If it finds that it’s blank, it’ll fire this navigation rule and be done.

However, if the URL is not blank, it’ll skip this rule and move on to the next one, which, referencing a different hosted control, will be forced to be displayed in a new tab!

In our internal testing it works flawlessly. No hitches, no performance issues.

But hey, you ask. What happens when we hit the last rule? Then we go back to the normal USD behavior with the dropdown for all subsequent form calls.

That’s it! A million thanks to our Microsoft PFE and CRM guru Daren Turner for providing this solution.

Have fun!

Tagged , , , , , ,

USD: More information about handling popups

A quick post to let you know about a couple of new things I found about today while working with popping up tabs inside sessions. First, to get an entity record to pop up in a new tab from a flyout menu, you have to use the Popup option in the Route Type fields when defining the navigation rule, otherwise the new entity will appear in the current tab:

pop-up_pop-up

 

In addition to this, if you’re working with Configuration entities, make sure you add all the related elements needed for the pop-up into the appropriate configuration files. That means you have to include the Entity, Hosted Control, and Navigation Rule entity records. Failing to do this will prevent the pop-up action to execute successfully, again opening the window inside the tab you’re currently in.

Have fun!

Tagged , , , ,

USD: Pop-up route tabs from web resources

This one eluded me for a while, but we finally found the answer, thanks to our fantastic Microsoft FSE, Daren Turner, who writes for the MSDN blog Dynamics CRM In The Field.

We needed to fire a new route tab from a web resource. A route tab is one that “lives” under a session tab. To give you an example, in our case the session is based on the Contact, and the route tab we wanted to open is for an account related to that contact.

To get this working, the first thing you need to do is to create a Hosted Control for the entity, if you don’t already have it. Here’s a sample of a hosted control:

hosted-control

Once the hosted control is defined, you need to create the Navigation Rule to handle the pop-up routing. This is where I spun my wheels, but first let me show you how it’s supposed to be created:

nav rule

You see Route Type? There’s an option there for Popup. Don’t select that one, even though it would seem to be the appropriate one. Use In Place as shown above. That will allow the USD to handle the routing inside the session. Also, both the Target Tab  and the Show Tab values should point to the previously created hosted control.

One more thing: You need to define an Entity Type if it doesn’t already exists. This is very straightforward and just requires one value, which is the entity logical name.

That’s it!

Now I got my pop-ups inside my sessions and I couldn’t be happier. Have fun!

Tagged , , , ,