web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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,216 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,216 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,216 User Group Leader on at

    Waiting for your feedback !

  • meelamri Profile Picture
    13,216 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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 79 Super User 2025 Season 2

#3
TAHER Mehdi Profile Picture

TAHER Mehdi 48

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans