Loading...

Fetchxml filter for View to exclude Non-interactive users

Fetchxml filter for View to exclude Non-interactive users

If you need to filter out specific records in view results while using fetchxml filter, this tutorial has got you covered. The tutorial addresses a Stack Overflow query about excluding Non-interactive user account records in a user view by using the fetchxml filter.

To understand this filter, it needs to be used on the System user entity, and the field should be "accessmode". Typically, Non-interactive users have an accessmode value of 4, which is what we can use to exclude them from the results, as per this query. The complete fetchxml filter will look like this:

<condition attribute="accessmode" operator="ne" value="4" />

The filter is then applied to the entity using the following fetchxml code:

  <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
    <entity name="systemuser">
      <attribute name="fullname" />
      <attribute name="businessunitid" />
      <attribute name="title" />
      <attribute name="address1_telephone1" />
      <attribute name="positionid" />
      <attribute name="systemuserid" />
      <order attribute="fullname" descending="false" />
      <filter type="and">
        <condition attribute="accessmode" operator="ne" value="4" />
      </filter>
    </entity>
  </fetch>

Overall, this tutorial is a handy guide for anyone looking to filter out specific records from their view results with the fetchxml filter.

Reference Link: https://arundynamix.blogspot.com/2020/12/fetchxml-filter-for-view-to-exclude-non.html

Published on:

Learn more
Arun Vinoth @ Dynamics
Arun Vinoth @ Dynamics

Share post:

Related posts

Get Related Entity data along with primary entity data in MS Dynamics CRM using QueryExpression

If you're looking to enhance the functionality of your MS Dynamics CRM by accessing related entity data along with primary entity data, this t...

8 years ago

Create / Update Related entity record in MS Dynamics CRM

This blog post provides guidance on creating and updating related entity records in MS Dynamics CRM. While working on the CRM platform, it's c...

8 years ago

Get Used/Unused Attribute from Entity using SQL Query in MS Dynamics CRM

If you're working with MS Dynamics CRM, this tutorial might help you extract useful information from entities. It provides a SQL query that en...

8 years ago

How the “Regarding” field works in Microsoft Dynamics 365 CRM and the process for adding a custom entity to the “Regarding” lookup field.

Microsoft Dynamics 365 CRM is a powerful tool that allows you to associate records with other entities through the use of the "Regarding" fiel...

7 months ago

FetchXML Aggregate Queries, Lookup Fields and Paging

In this post, Mark Carrington discusses an interesting bug that was found in SQL 4 CDS by David Fraticelli, which sheds light on how FetchXML ...

2 years ago

Allow Native Mapping When Referencing a Parent Entity

If you are working with CRM Relationship mapping in Out of Box (OOB) CRM, you may be aware of the limitations of the mapping, which only works...

8 years ago

CRM Activity Mystery

The Dynamics CRM's activity feature is often seen as a mystery, even to experienced users. In this blog post, the author explores this topic b...

3 years ago

Expanding Lookup and filtering based on a value in related Entity - Web API roadblock

If you're looking to expand lookup and filtering based on a value in a related entity, this tutorial might be helpful. However, the author enc...

3 years ago

D365 CRM Entity Relationships

In this post, we delve into the different types of entity relationships in Microsoft Dynamics 365 CRM and offer insights into how they work. U...

2 years ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy