Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Filter Entity List using Query String ID in URL from previous Entity List

(0) ShareShare
ReportReport
Posted on by

I have an Entity List I am trying to further filter by limiting the records by a GUID provided in the URL from a previous Entity List. I am trying to accomplish this using the default EntityList layout, I just want to filter the records in the EntityList by a dynamic GUID value given from a prior EntityList.

Process:

-1st EntityList is a list of Locations. When clicking one of the records, it takes you to the next page which adds the locationid GUID value. 

Ex. https://xxxxxxxx.microsoftcrmportals.com/testlocations/testlistings/?locationid=91b4b329-2717-e811-810c-5065f38acbf1

-2nd EntityList is a different Entity view that uses the locationid GUID value to further filter the records shown in the grid to the corresponding Location record. 

Is there a way to accomplish this with Liquid coding or Javascript?

I've thought about adding a EntityView value to the Web Template similar to the guide below, but I could not find a way to filter using the URL GUID.

https://debajmecrm.com/2017/08/20/dynamics-365-adx-portals-adx-portal-tips-tricks-show-the-top-record-from-an-entity-view-based-using-query-filters-in-dynamics-365-portals-adx-portals/

Thank you everyone!

*This post is locked for comments

  • Suggested answer
    Power Expertise Profile Picture
    Power Expertise 5 on at
    RE: Filter Entity List using Query String ID in URL from previous Entity List

    In power portal you can achieve this by creating a subgrid . I have explain this in detail in my video . You can refer www.youtube.com/watch

  • dkimbo Profile Picture
    dkimbo on at
    RE: Filter Entity List using Query String ID in URL from previous Entity List

    Thank you for the replay Ravi!

    The two links you have provided show me how to add a FetchXML query to a Web Template, but they then create a custom entity list instead of modifying the OOB entity list provided to us. I am wondering if this FetchXML query in the template can further filter a OOB entity list on a web page. I've added my Web Template below, I am referencing the Entity List which is attached to the web page rather than creating one from scratch myself.

    Could I modify my entity list reference with the new FetchXML query? I have not found any examples online that could filter the OOB entity list like this. Perhaps I could use the EntityView tag to augment the entitylist line in the template, but I could not find any code online that modifies the entity list in this manner.

    {% extends "1 Column, How To" %}

    {% block main %}

     {% include "Redirect to Sign In Page" %}

        {% fetchxml LocationQuery %}

       <fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0">

       <entity name="new_transaction">

       <attribute name="new_transactionid"/>

       <attribute name="new_name"/>

       <attribute name="createdon"/>

       <order descending="false" attribute="new_name"/>

       <filter type="and">

       <condition attribute="new_location" value="{{ request.params['locationid'] }}" uitype="new_location" operator="eq"/>

       </filter>

       </entity>

       </fetch>

     {% endfetchxml %}

     {% if page.adx_entityform %}

       {% entityform id: page.adx_entityform.id %}

     {% endif %}

     {% if page.adx_entitylist %}

       //Is there a way to add the FetchXML query to this entity list?

       {% include 'entity_list' key: page.adx_entitylist.id %}

     {% endif %}

     {% if page.adx_webform %}

       {% webform id: page.adx_webform.id %}

     {% endif %}

    {% endblock %}

    {% block aside %}

     {% include "Weblink List Group" weblink_set_name: "Secondary Navigation" showdescriptions: true %}

     {% include "ad" ad_placement_name: "Sidebar Bottom" %}

    {% endblock %}

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Filter Entity List using Query String ID in URL from previous Entity List

    Hi Daniel,

    I don't think there is any OOB configuration to filter the entity list using the query string parameter but you can certainly use Liquid & Fetchxml.

    Check the below links. The first link even have the code to get the query string parameter and filter the list.

    community.dynamics.com/.../dynamics-365-portals-liquid-templates-part-3-retrieve-data-using-fetchxml

    stoneridgesoftware.com/using-liquid-templates-and-fetchxml-to-retrieve-data-in-a-dynamics-365-online-portal

    Hope this helps.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans