Skip to main content

Notifications

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!

  • Erika Zabinski Profile Picture
    10 on at
    RE: Retrieve all personal views containing a specific field

    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!

  • meelamri Profile Picture
    13,212 User Group Leader on at
    RE: Retrieve all personal views containing a specific field

    Hi,

    Any news ?

  • meelamri Profile Picture
    13,212 User Group Leader on at
    RE: Retrieve all personal views containing a specific field

    Waiting for your feedback !

  • Erika Zabinski Profile Picture
    10 on at
    RE: Retrieve all personal views containing a specific field

    Thank you Mehdi! I will check this out.

  • Verified answer
    meelamri Profile Picture
    13,212 User Group Leader on at
    RE: Retrieve all personal views containing a specific field

    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
    RE: Retrieve all personal views containing a specific field

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

  • Suggested answer
    meelamri Profile Picture
    13,212 User Group Leader on at
    RE: Retrieve all personal views containing a specific field

    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 

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,233 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,982 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans