Tuesday 13 August 2013

SQL To Find out who owns a saved view in CRM 2011

Not so much fetch xml but still useful, in theory the same could be created in fetchxml too. This query shows how to find a view in CRM and who owns it. You can also retieve the actual fetchxml from the FetchXML field in the query below.


SELECT

FetchXml,

UserQueryId,

Name,

LayoutXml,

CreatedOn,

OwnerId,

(SELECT TOP (1) domainname

FROM FilteredSystemUser AS s

WHERE (systemuserid = u.OwnerId)) AS domainname

FROM UserQueryBase AS u

WHERE (Name LIKE '%Insert View Name%') -- change to the view your looking for

AND (OwnerId = 'xxxx') -- enter the quid of the user if your looking for views owned by a user.

No comments:

Post a Comment

ADFS Timeout on Server 2012 for CRM 2011

This follows on from this Microsoft Guide http://social.technet.microsoft.com/wiki/contents/articles/7681.setting-the-adfs-timeout-for-crm...