USD – Opening Multiple Records

Leave a comment

In Unified Service Desk, users can select a Dynamics 365 record, which we can set up to open in its own hosted control. For example, if a user selects a Contact, we can open that contact in a “Contact” hosted control. However, what if we would like to open multiple tabs of Contacts?

For example, in USD we have a list of contacts:

Selecting one contact opens the contact tab:

Now, if we select another contact from our contact list, it will display it in the Contact tab and overwrite it. If we would like the user to switch between multiple contacts, we can set Allow Multiple Pages to “Yes”:

Now, when we select another contact, we will see a drop-down list of contacts on the Contact tab, allowing the user to choose which one to display:

What if we would like to give a user the ability to see multiple “Contact” tabs? One way to do this is to use multiple Contact hosted controls.

Let’s say we create a 2nd Contact hosted control, called “Contact 2”, which is the same as “Contact” (both without the option to show multiple pages):

Now, when a user selects a Contact, we can determine if a hosted control is open using IsAppLoaded. If the contact is not open, we will open our regular hosted control. If it is already open, we will open Contact 2. A user can then close a Contact they are not using if they need to have an additional one side by side. Of course, you can create as many Contact hosted controls as you need.

Let’s create our Windows Routing Rule. Note we are not opening any tabs here:

Next, we will create some actions. When a contact is selected, the replacement parameters are populated, including to contact id:

We can use the Id to create a URL that we will navigate to. Opening a record through Email a Link, we can see the URL structure:

https://<yourcrm>.crm.dynamics.com/main.aspx?etc=2&extraqs=id=%7b<contactid>%7d&pagetype=entityrecord

Our action to open Contact 1 and 2 looks like:

However, in Contact 1’s open action, we will only run it if our $Return is false, i.e. Contact 1 is not open:

Likewise, we will only open Contact 2 if Contact 1 is open:

The navigation rule actions should now look like:

Let’s test this. Open USD and select 2 contacts:

Contact 1 will open in the Contact tab:

And contact 2 in the Contact 2 tab:

 

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *