Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Show/Hide public views based on team (or role) (RetrieveMultiple plugin applied to SavedQuery) - not working...

(1) ShareShare
ReportReport
Posted on by 30

Hi,

I'm trying to write a RetrieveMultiple plugin to show/hide entity views, based on a user's team (alternatively, based on role would also be acceptable).

I've tried to adapt the code made available here:
https://prasannavadlamudiblog.wordpress.com/2018/06/09/team-based-views-in-microsoft-dynamics-crm-365/

I've amended that code to cater for the fact that UCI renders views using FetchExpression, and not QueryExpression.

The code doesn't seem to work, however. I have debugged and can't see any problems, so I'm very confused why this isn't working.

I was hoping that someone might be kind enough to help me with understanding why this doesn't work?

Here is my code (I wasn't able to paste in this post--I think it's too long):
https://pastebin.com/QMmA7XtL

And here is my XML (which is used as an unsecured config to determine the target entity, the team name, and the views to show/hide):


 
  
   
   
  
  
 

If anyone can provide any assistance, I'd be very grateful!

Thanks

  • vanfog Profile Picture
    vanfog 30 on at
    RE: Show/Hide public views based on team (or role) (RetrieveMultiple plugin applied to SavedQuery) - not working...

    Bump… anyone?

    I viewed the trace log and it doesn’t seem to be firing correctly when I view a table for a relevant entity. 

    The few times it does fire, all the trace events get called  

    Debugging and attaching to VS shows no issues. I’m at a loss as to what the issue could be.

    Any help or even a pointer in the right direction would be hugely appreciated!

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,885 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,569 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans