Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

What is the best solution to define the View filtering conditions depending on the division that user calling the plugin belongs to?

(1) ShareShare
ReportReport
Posted on by 15

Hello Dynamics people,

I hope you are doing well.

I have this use case:

The user will examine an entity called "program" in this entity we defined 2 views:

  • The first view is the default view (this view will not be dynamic, in other words all the users will have the same filtering condition)
  • The second view will be a dynamic view, in other words the filtering condition will depend on the user triggering the plugging on RetrieveMultiple (wthe filtering depend exactly on the division that the user belongs to 
  • Note: I want to know the active View because I won't be making any changes to the filtering condition if the active view is the default view

I have two issues here or rather I am looking for the best solution to accomplish all of this:

1 - What is the best way to define the filtering conditions deponding on a division

2 - How to get the active view in the plugging

My solution:

step 1 - I will create an entity wich will contains all the filtering conditions for a specific division

step 2 - For the pluggin case: I came to know that there is no way to know the current active view but we have an access to the Query in InputParameters which contains the FetchXML for the active view, so my idea is to put an attribute to the created entity (step 1) then add that attribute to result of the default view then if that attribute exist in the Query the I will stop the execution of the plugging if note then I will apply the new filtering conditions.

I don't if this is the best solution or maybe there is better solutions, I hope that the use case is clear.

I will be waiting for your suggestions.

Thank you.

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

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans