Pattern to Open a Subgrid Record in a New Tab in USD

Leave a comment

Let’s look at a scenario where, in USD, we have an entity called Entity A, that has a one to many relationship with an entity called Entity B. Entity A has a subgrid on a form to Entity B. In USD, when a user clicks on the subgrid to create a new Entity B, it should open a new tab for Entity B so a user can enter that information which will then be associated with Entity A when it is saved.

Let’s create a new entity:

Called Entity A:

Now let’s create a new entity called Entity B:

And add a relationship:

Of type Many to one:

Between Entity A and Entity B:

Save the Entity:

Now let’s add to the Entity A form a subgrid for Entity B:

Click Subgrid:

Select Entity B:

Save and Publish:

Now in the web, when we go into a new Entity A record, we see the new subgrid. Click + New Entity B:

This opens in same window.

In the USD configuration, let’s create a new Entity A Hosted Control, with Dynamic = No and Application is Global = Yes, so we can open it when USD starts:

And also a hosted control called Entity B Hosted Control:

Add a new action to DesktopReady:

We will create a New_CRM_Page for Entity A:

Now, if we were to run this, USD would show a blank page, as the Windows Navigation Rules have not been set up. First let’s create a new Entity Type:

And then a Windows Navigation Rule:

Which will route window to Entity A hosted control:

Now when USD loads, we see the new entity form:

Clicking on + New Entity B we see it is opening in the same hosted control:

Let’s add another entity type for Entity B:

And for Entity A Hosted Control to Entity B:

We will route the window. Note this is In Place:

Now when we click on Entity B:

It opens in its own tab:

In saving a Entity B record in this case:

It is associated to Entity A:

 

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 *