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 :
Customer experience | Sales, Customer Insights,...
Answered

Retrieve all personal views containing a specific field

(1) ShareShare
ReportReport
Posted on by 10

I'm pretty sure this is not possible, but checking just in case:

Is there any way to retrieve a list of all personal views that reference a specific field?

I want to delete a custom field on the Contact entity. I know I can easily identify where it appears in system views, forms, etc. But since it's a highly used entity, many users probably have personal views that include it. I want to alert those users to remove it from their views, so they don't  get an error message later on after I delete the field. 

Thanks in advance for any enlightenment!

I have the same question (0)
  • Suggested answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    Hi, 

    I think that you can find the personnal views using some fetchXml query. 

    In fact, all personnal views are stored in "userquery" entity. 

    Let me know if you need more guidance to construct your query 

  • Erika Zabinski Profile Picture
    10 on at

    Thanks Medhi. Unfortunately the fetchXML query still only returns personal views created by me, not those owned by other users.

  • Verified answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    Yes, you're right. You need a C# script to do a fetch with another user's context. This is possible, I'll share my code in a little while

    Edit: 

    For example, I display all Contact's personal views using the custom field "mel_contactnumber" and their owner: 

    https://gist.github.com/melamriD365/06fc71bfbcc11a30670f73deb1d122b7

  • Erika Zabinski Profile Picture
    10 on at

    Thank you Mehdi! I will check this out.

  • meelamri Profile Picture
    13,218 User Group Leader on at

    Waiting for your feedback !

  • meelamri Profile Picture
    13,218 User Group Leader on at

    Hi,

    Any news ?

  • Erika Zabinski Profile Picture
    10 on at

    Mehdi, thanks again for your help last week. This is solved --- we ended up querying the table itself since we're on-premise. But really appreciate you sharing the code and I hope it helps someone else!

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 > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 94 Super User 2026 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 68 Most Valuable Professional

#3
ParthPatel249 Profile Picture

ParthPatel249 62

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans