Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

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

Posted on by 412

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

  • Rizwan Aarif Profile Picture
    Rizwan Aarif 480 on at
    RE: Portals: {{entityview.total_records}} is ignoring the Entity List filters

    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.

  • Irena Benja Profile Picture
    Irena Benja 412 on at
    RE: Portals: {{entityview.total_records}} is ignoring the Entity List filters

    Thank you!

  • Suggested answer
    Dmytro Rutkovskyi Profile Picture
    Dmytro Rutkovskyi 1,835 on at
    RE: Portals: {{entityview.total_records}} is ignoring the Entity List filters

    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. 

  • Verified answer
    Justinjose Profile Picture
    Justinjose 2,707 on at
    RE: Portals: {{entityview.total_records}} is ignoring the Entity List filters

    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

  • Irena Benja Profile Picture
    Irena Benja 412 on at
    RE: Portals: {{entityview.total_records}} is ignoring the Entity List filters

    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.

  • Suggested answer
    Justinjose Profile Picture
    Justinjose 2,707 on at
    RE: Portals: {{entityview.total_records}} is ignoring the Entity List filters

    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
    Irena Benja 412 on at
    RE: Portals: {{entityview.total_records}} is ignoring the Entity List filters

    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.

  • Justinjose Profile Picture
    Justinjose 2,707 on at
    RE: Portals: {{entityview.total_records}} is ignoring the Entity List filters

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans