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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Unanswered

Virtual Entity: Access the filter condition within the retrieve multiple plugin

(0) ShareShare
ReportReport
Posted on by 40

Hello!

I have a new virtual entity, which I am populating data from an external source with an api call. I have a subgrid within the case form, and I have a N:N relationship created with incident and this entity. The subgrid is for the related records. Therefore, when I load the subgrid, I see the fetchXML in network trace contains a filter condition wtih linked entity to incident, and has the incident number. However, the "Query" that I see from the plugin that this virtual entity data source-triggered retrievemultiple would trigger, doesn't contain the filter condition. The Linked Entity object is empty. 

fetchXml: <fetch version="1.0" mapping="logical" returntotalrecordcount="true" page="1" count="4" no-lock="false"><entity name="virtualentity"><attribute name="myorg_name"/><attribute name="myorg_title"/><attribute name="myorg_status"/><attribute name="myorg_severity"/><attribute name="myorg_owningid"/><attribute name="myorg_owningcontact"/><attribute name="myorg_modifieddate"/><attribute name="myorg_id"/><attribute name="myorg_createdate"/><attribute name="virtualentityid"/><link-entity name="myorg_virtualentity_incident" intersect="true" visible="false" to="virtualentityid" from="virtualentityid">
<link-entity name="incident" from="incidentid" to="incidentid" alias="bb">
<filter type="and">
<condition attribute="incidentid" operator="eq" uitype="incident" value="de5759c2-928a-ec11-8f97-0022487af2d6"/>
</filter>
</link-entity>
</link-entity></entity></fetch>

But what I get within the plugin is this:

{"Distinct":false,"PageInfo":{"PageNumber":0,"Count":0,"ReturnTotalRecordCount":false,"PagingCookie":null},"LinkEntities":[],"Criteria":{"FilterOperator":0,"Conditions":[],"Filters":[]},"Orders":[],"EntityName":null,"ColumnSet":{"AllColumns":false,"Columns":[],"AttributeExpressions":[]},"NoLock":false}

What am I missing here? Any insights will be appreciated. Thanks!

I have the same question (0)
  • Chirita Cristian Profile Picture
    10 on at

    Hello, I know this thread is old but I am going to post a way.

    First, you need to go to the quick find form view of the virtual entity and add the filtering columns.

    After that, you have two ways of it showing up in the code when you select filters for all of the filters that have the equals operator you can find them under query.Criteria.Conditions but for all the other operators you can find them under query.Criteria.Filters. With the second option, you have to get the conditions from each filter, a way to do that is by parsing through the array and getting the conditions for each filter.

    For example, when you select a date with the today operator it will only show up under the filters and it will be split into 2 conditions >= date time and <= date time. You have to parse through all the filters and add the ones you want to take into account.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#2
11manish Profile Picture

11manish 18 Super User 2026 Season 2

#3
Syed Aqib Raza Profile Picture

Syed Aqib Raza 17

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans