Arun Vinoth @ Dynamics

Arun Vinoth @ Dynamics

https://arundynamix.blogspot.com

Fetchxml filter for View to exclude Non-interactive users

Published

Sometimes we may need to filter out the records from view results, and we use the fetchxml filter to apply it in run time. Similar question raised in Stack Overflow, and it is to filter out the Non-interactive user account in user view.

To understand it, the filter has to be on System user entity and field has to be accessmode

Normally the non-interactive user will have value of accessmode = 4 and we can apply this below filter.

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

The complete fetchxml will look like this:

<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>

Continue to website...

More from Arun Vinoth @ Dynamics