web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Portals: {{entityview.total_records}} is ignoring the Entity List filters

(0) ShareShare
ReportReport
Posted on by 414

Hello, 

I have created on my crm entity a view with some base filters and I am using this view on one of my portal entitylists where I am also using the Filter Conditions section to add a filtering based on the current logged user. 

In one of my liquid templates I want to count the records in this view, but {{entityview.total_records}} is ignoring my portal filter and returns me the number of records found on normal crm view.

Do you know how you if there is a way to get only the records shown on portal?

I can not use Jquery because I do not want to render the grid.

Any other idea except fetch xml?

Regards,

Irena.

*This post is locked for comments

I have the same question (0)
  • Justinjose Profile Picture
    2,707 on at

    Hi Ira,

    May I know how you applying the filter? I done some thing similar which will filter on button click based on the value provided in the text field. I am get the correct filtered record count.

    Thanks

    Justin Jose

  • Irena Benja Profile Picture
    414 on at

    Hello Justin,

    I am talking about the filtering conditions inside the Entity List.

    2158.Filter.PNG

    BTW, because of other work I do with this entity on the portal I have to use  Global on the Entity Permission.

    Regars,

    Irena.

  • Suggested answer
    Justinjose Profile Picture
    2,707 on at

    Hi Ira,

    Can you try following code in your web template

    {% entitylist id:page.adx_entitylist.id %}
      {% entityview %}
        Total  {{ entityview.total_records }} records.
      {% endentityview %}
    {% endentitylist %}

    Thanks

    Justin Jose

  • Irena Benja Profile Picture
    414 on at

    Hello Justin,

    Thanks for you suggestion!

    I know this piece works case I have been using it, but this can be done only on the Page Template where the entitylist is showing and in my case I want to count on my Header Template to show on my tab asside the name also the number of records.

  • Verified answer
    Justinjose Profile Picture
    2,707 on at

    Hi Ira,

    You can call entitylist Explicitly. Add following code in the header and change the highlighted part accordingly.

    {% entitylist my_list = name:"listname" %}
      {% entityview logical_name:'logicalname', name:"viewname" %}
      Totlal Record Count 0 {{entityview.records.size}
        {% for item in entityview.records %}
         Record name -  {{item.name}}
        {% endfor %}
      {% endentityview %}
    {% endentitylist %}


    Thanks

    Justin Jose

  • Suggested answer
    Dmytro Rutkovskyi Profile Picture
    1,835 on at

    You can retrieve record count Justin proposed (even more ways to interact with entitiyview in this example ) and store this value in Javascript variable (or any other browser accessible storage, except cookies :)). Then you can access it and render in Header Template. 

  • Irena Benja Profile Picture
    414 on at

    Thank you!

  • Rizwan Aarif Profile Picture
    480 on at

    Hi,


    Is it possible to use entity view and render a custom (html) table by dynamically retrieving columns & rows?

    I want to consume a CRM view into portals which can be filtered using Query string (search) params?

    TIA.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans