I agree with
@Kim Jopp that a SQL Query for On-Prem can easily pull the results. But if you are online that is not possible. Perhaps
@Jonas Rapp can shed some light on why I can't see all User Views in
FetchXML Builder, even though I am System Administrator.
I have updated the Fetch a bit because even though I asked for OwnerIdName on the original Fetch, it doesn't display on the results. This Fetch will dispay the User Name in its own Column.
<fetch top="500" >
<entity name="systemuser" >
<attribute name="fullname" />
<link-entity name="userquery" from="ownerid" to="systemuserid" link-type="inner" >
<attribute name="name" />
<attribute name="fetchxml" />
</filter>
<condition attribute="fetchxml" operator="like" value="%%Opportunityid%%" />
</filter>
</link-entity>
</entity>
</fetch>
When I run the Fetch I do not pull as many Records as I expected, even though I am System Admin in CRM. Something native to FetchXml is preventing me from seeing all Queries.
When I change the Fetch to pull in all User Queries for a specific User I get zero results even though SQL says he has 247 Queries.
<fetch top="500" >
<entity name="systemuser" >
<attribute name="fullname" />
<filter>
<condition attribute="fullname" operator="like" value="%Jeff M%" />
</filter>
<link-entity name="userquery" from="ownerid" to="systemuserid" link-type="inner" >
<attribute name="name" />
<attribute name="fetchxml" />
</link-entity>
</entity>
</fetch>
------------------------------
Gerry Yurko
CRM Developer
Crown Castle Fiber Networks
Boxborough MA
------------------------------
Original Message:
Sent: Jan 13, 2021 10:50 AM
From: James Walsh
Subject: Retrieve all personal views referencing a specific field
After looking into this a bit further, we cannot necessarily put in the name/s of users because we do not know which ones have a personal view that contains a reference to a particular field.
Is there a way to leverage the same query that will return a list of users and their personal views that reference a specific field?
------------------------------
James Walsh
Burns & McDonnell
Kansas City
Original Message:
Sent: Jan 07, 2021 10:42 AM
From: Gerry Yurko
Subject: Retrieve all personal views referencing a specific field
If you use XrmToolbox then open FetchXML Builder. Here is a sample Query. You have to choose the Schema Name, not the Field Name (Label).
The OwnerIdName searches the User's personal Views. You can also search System Views by changing userquery to savedquery.
<fetch top="50" >
<entity name="userquery" >
<attribute name="name" />
<attribute name="owneridname" />
<attribute name="layoutxml" />
<filter>
<condition attribute="owneridname" operator="eq" value="Gerry Yurko" />
<condition attribute="layoutxml" operator="like" value="%new_churnperiodid%" />
</filter>
</entity>
</fetch>
------------------------------
Gerry Yurko
CRM Developer
Crown Castle Fiber Networks
Boxborough MA
Original Message:
Sent: Jan 06, 2021 11:24 AM
From: James Walsh
Subject: Retrieve all personal views referencing a specific field
Context: We are swapping out an important field used in our system. Before pushing this change into production, it would be ideal to have a list of users and their personal views that contain a reference to this field (either a filter or a column). We can then target them for a communication letting them know they need to swap out the field to avoid confusion or consumption of bad data.
Question: By owning user, is there a way to retrieve a list of all personal views containing a reference to a specific field?
------------------------------
James Walsh
Burns & McDonnell
Kansas City
------------------------------