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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 111 Super User 2026 Season 2

#2
Syed Aqib Raza Profile Picture

Syed Aqib Raza 88

#3
ParthPatel249 Profile Picture

ParthPatel249 84

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans