Show two Entity Lists on a Dynamics 365 Portal Page

The other day I needed to create a Dynamics 365 Portal page showing 2 entity lists.  Anyone who has worked with the Dynamics 365 Portal knows that you can simply define an entity list on the web page record which will render that entity list on your portal.

entitylist1

That works great, but what if you want to show 2 (or more) entity lists?

I have heard that question a few times in various web casts and conference sessions.  The answer is “oh, yeah, that’s totally doable”

So I went on a bit of a Google search looking for how to configure that and I really couldn’t find the answer.

I even read through https://docs.microsoft.com and couldn’t determine the answer.  The problem was that I was overthinking it, and the solution is pretty simple, so here it is more for my future self, but also to anyone else who might be interested.

You first need to define your Entity Lists.  I choose Orders and Invoices for this example.

entitylist2
Order Entity List
entitylist3
Invoice Entity List

In order to render both of these entity lists on a portal page, we need to build a custom Liquid template.  They “key” statement are the lines that display the entity list, we can pass the actual entity list name as the key.  My mental block was thinking that statement could only pull the entity list from the web page, so I was trying much more complicated ways to accomplish this.

{% include ‘entity_list’ key: “ORDER LIST” %}

So we just need to add those 2 lines to our Web Template:

entitylist4

From there, you will need to create a page template and then create a web page using the page template (this is Portal 101 stuff).

Finally you will have your result of 2 entity lists on a single web page:

entitylist5
2 Entity Lists on one page

I am sure some of you that do a lot of work with portals already know this, but I figured if I had a small challenge with this, others might too.

homer-pythagoras
I am smrt

Note that if you change the name of your entity list, be sure to update your Web Template record as well.

Hope this helps!

Nick Doelman is a Microsoft Business Solutions MVP and will be speaking at Extreme365 in Long Beach.  Join Nick and other MVPs in the Innovation Challenge!  There might even be an opportunity to use 2 entity lists on a single page!

2017 US Signature files_Im speaking at Gray1

7 thoughts on “Show two Entity Lists on a Dynamics 365 Portal Page

    1. I would double check the Liquid code, as that is prone to simple mistakes. If/when you upgrade to the latest version of portals there is intellisense for liquid which might highlight your issue.

      Like

  1. Is there a way to include metadata filters with the entity list? I have a fetchxml filter on the entity list but it does not appear with the entity list when I add it to the page this way?

    Like

  2. Hi Nick,
    i followed this post and I have the same requirement. I am able to add two entity list and updated the code in existing webtemplate “Customer Service – Support Home”.
    I have added above your code and it works. When I see in portal, I am able to see two entity list views but issue is second entity list view records does not have hyperlink. I can not open the record from second view. Could you please suggest me how can I open the record from second view.
    I am not able to attach the screen shots. But as in your post I am able to order view records are not hyperlink whereas Invoice View records are hyperlink.

    Like

    1. Hi Vivek, Sorry to hear you are having trouble. I tried it on a portal on my end and it seems to work OK. I would double check your settings on the options on your entity list where you specify the drill down record. The other thing to look at is to try to view the page in the new portal studio, and configure it from there. That was not available when I wrote this post and its how I add multiple entity lists and forms to a single page now (its really easy, but doesn’t have all the features). I hope that helps! Cheers, Nick

      Like

Leave a Reply to Shakti Singh Rajput Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google 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 )

Connecting to %s