Customer Engagement & Dynamics CRM Forum

 View Only
Expand all | Collapse all

C# created Personal Views work great, but they're missing from the Dashboard dropdown menu

  • 1.  C# created Personal Views work great, but they're missing from the Dashboard dropdown menu

    Posted May 30, 2022 01:49 PM
    Just spent most of Memorial Day weekend coming up with code that auto-generates Personal View (UserQuery).  As you know, Personal View access is restricted to the owner, even from admins.  To work around this, I must create the Personal Views using a specific user ID, and then auto-generate Shares so that the people can actually use these Personal Views.

    Currently, my C# code creates the necessary Personal Views via CrmServiceClient.Create(UserQuery), then grants access to them via Microsoft.Crm.Sdk.Messages.GrantAccessRequest(PrincipalAccess, EntityReference).  For the record, the first thing I do is grant all access to every System Administrator, which includes myself.  It's all working great, except for one small, infuriating thing.

    If I then go to the dashboard, to the chart that uses these Personal Views, and then click "View the records that are used to generate the chart" (or "the newspaper icon" as I call it) to the above right of the chart, I can see all my System and Personal Views in the dropdown, working exactly as expected and happy as a clam.

    But if I click the dropdown above and to the left of the chart on the dashboard--the one dropdown that really needs to display the Personal Views--it doesn't show any of the Personal Views I added.  Even more strangely, if I use that menu to "Create Personal View", the new view only remains in the menu until I refresh the screen, where it disappears just like all the other Personal Views.  Further research shows this new Personal View is created and does appear everywhere else it's supposed to.

    I would be grateful if anyone would tell me what I'm overlooking when generating the Personal Views.  What do I need to add or update via code that will make the dashboard's chart's view dropdown correctly display the Personal Views?

    I've thoroughly searched the web, and only found information that reinforced the notion that what I'm doing is correct so far.

    Thank you in advance.

    Joseph Thiel
    Software Engineer
    Per Mar Security
    Davenport IA

  • 2.  RE: C# created Personal Views work great, but they're missing from the Dashboard dropdown menu

    Posted May 31, 2022 03:33 AM
    @Joseph Thiel I was creating a new system dashboard yesterday and had created some new views to be used on the dashboard.

    When I tried to add the views (both as a table or chart), the views simply weren't showing up in the ​view selector. I tried to create several views. 

    I am wondering if a bug has sneaked in.

    Niels Lønberg
    Digital Sales Specialist
    Semco Maritime

If you've found this thread useful, dive deeper into User Group community content by role