Answered by:
Multi - User Views

Question
-
I am wondering if it is possible to have one view in an entity that displays different data depending on who the user is?
Thanks
- Edited by JMcCon Tuesday, February 24, 2015 11:20 AM
Tuesday, February 24, 2015 11:20 AM
Answers
-
Hi again JMcCon,
I see you edited to question in order to clarify it :)
As I mentioned in my above post, without development, all you can do is to create a view with the superset of columns you need and then, with field level security, hide the values that should not be shown to the users.
Using the SDK, you can try different approaches though, but they might be heavy performance wise, specially if it's an entity with many records. What you can do is a Plugin in the "Pre RetrieveMultiple" message that changes the FetchXML CRM is about to execute according to the executing user role. This also means you should make an entity (or pass a configuration XML in the plugin configuration) to configure that in order to keep the code as clean as possible.
Kind Regards,
Pedro
- Marked as answer by JMcCon Tuesday, March 3, 2015 4:16 PM
Tuesday, March 3, 2015 1:06 AM
All replies
-
Hi,
If you are adding a filter for a User lookup, you can select the "Equals current user" option from the dropdown. This way you can display different data for different users.
Regards,
Adam
Tuesday, February 24, 2015 1:10 PM -
Could you add a If statement, something like, If User equals Joe then display only data specific to Joe's location ?
Is this possible?
Friday, February 27, 2015 10:35 AM -
You cannot directly check who the current user is, but you can show data that is related to the current user by the relationships (e.g. you could show accounts owned by users who are the same team as the current user)
Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
Friday, February 27, 2015 3:39 PMModerator -
Thanks for the reply David.
Could I have the View display only information specific to Joe's Team?
Monday, March 2, 2015 3:35 PM -
Hello JMcCon,
Microsoft Dynamics CRM does that by using it's security model.
Basically a user will see in a grid the records that his location within the organization (Business Unit) and his roles (either directly given or by a team he's in). You can also have views that apply filters taking in consideration the "Current User" which you can apply to any SystemUser Reference field.
If what you mean is displaying different columns in a view for different people, that is not possible. The only thing you can do there is to hide certain information from certain users by using field level security.
Hope this helps you,
Kind Regards,
- Edited by Pedro Beltrao Monday, March 2, 2015 6:20 PM typo
Monday, March 2, 2015 6:20 PM -
Hi again JMcCon,
I see you edited to question in order to clarify it :)
As I mentioned in my above post, without development, all you can do is to create a view with the superset of columns you need and then, with field level security, hide the values that should not be shown to the users.
Using the SDK, you can try different approaches though, but they might be heavy performance wise, specially if it's an entity with many records. What you can do is a Plugin in the "Pre RetrieveMultiple" message that changes the FetchXML CRM is about to execute according to the executing user role. This also means you should make an entity (or pass a configuration XML in the plugin configuration) to configure that in order to keep the code as clean as possible.
Kind Regards,
Pedro
- Marked as answer by JMcCon Tuesday, March 3, 2015 4:16 PM
Tuesday, March 3, 2015 1:06 AM -
Thanks Pedro.Tuesday, March 3, 2015 4:16 PM