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)

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

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    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.

  • dkimbo Profile Picture
    on at

    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
    Power Expertise Profile Picture
    5 on at

    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

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