cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TheIntern
Helper II
Helper II

entity list set display name

I am facing a strange issue with entity lists. I am including multiple entity lists on my page with the entitylist liquid tag:

{% include "entity_list" key:"List 1" %}
{% include "entity_list" key:"List 2" %}
 
Each contains 'View 1' and 'View 2'.
In the entity list configuration, i have set the display names to List1-View1, List1-View2, List2-View1, List2-View2.
 
However, when I am importing these lists, the display names are not visible on the page. I can only see "View 1" and "View 2".
 
I have done this on other pages, and it works fine there. I have tried to reconfigure these lists, but with no success.
The configurations are the same, with page size = 5 and entity permissions enabled.
 
Is there a way to set the list's display name with liquid tags?
 
1 ACCEPTED SOLUTION

Accepted Solutions

I think I see your problem. This looks to be a bug in the out of the box rendering of the view drop-downs. It does not look to take the 'display name' into consideration when rendering these using the standard web templates.

 

Name.jpg

 

Name1.jpg

You can change the wording of these using jQuery.

Open your Entity List -> Options -> Custom JavaScript -> Paste the following (and amend as required)

 

$(document).ready(function() {
$("body").find("a[aria-label='Active Contacts']").html("Hello world");
});

 

 

View solution in original post

11 REPLIES 11
OOlashyn
MVP

Hi @TheIntern ,

 

You can get the name of the entitylist via adx_name property of entitylist object. You can find an example of rendering entitylist here

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

But how do I set the display name using the liquid tag? The link you shared talks about fetching it

C2GUY
Helper I
Helper I

Sorry, I may be missing something.. but if you have separate entity lists setup with the relevant views and you have named them as 'List1-View1' etc then why could you not call each of them in your web template by name?

 

 

 

{% include 'entity_list' key: 'List1-View1' %}
{% include 'entity_list' key: 'List1-View2' %}
{% include 'entity_list' key: 'List2-View1' %}
{% include 'entity_list' key: 'List2-View2' %}

 

 

 

I want to have the view selector showing. When i import the two lists into my page, it uses the view name in the selector, even though i have set display name from advanced settings

I think I see your problem. This looks to be a bug in the out of the box rendering of the view drop-downs. It does not look to take the 'display name' into consideration when rendering these using the standard web templates.

 

Name.jpg

 

Name1.jpg

You can change the wording of these using jQuery.

Open your Entity List -> Options -> Custom JavaScript -> Paste the following (and amend as required)

 

$(document).ready(function() {
$("body").find("a[aria-label='Active Contacts']").html("Hello world");
});

 

 

Thanks, that helps!

 

I am also facing an issue where when i have multiple lists on a page, changing the view from first grid makes the scroll go all the way to the bottom of the page. can you help with how that can be addressed?

also, the change you suggested goes away sometimes, after selecting a different view. not sure how that can be changed back

I think we have been caught out by the portal cache.

This looks to work fine using the display name.

Populate the display names then be sure to login as an administrator and clear your cache using the "clear cache" button at:

https://yoursite.microsoftcrmportals.com/_services/about

 

C2GUY
Helper I
Helper I

It looks like we have been caught out by the portal cache.

This does appear to work as expected using the display name.

Ensure you are logged in as an administrator and visit https://yoursite.microsoftcrmportals.com/_services/about

Click the "Clear Cache" button and refresh your page.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,224)