Goals in Microsoft Dynamics CRM - owner and manager fields are different
What I mean?
As you can see, eventhough there is an ownerid field on Goal entity, it is not normal Owner field. And same for the Goal owner field - it is not regular owner field.
However, let me explain what this means for further configuration.
We have tried to setup some goals which are assigned to the teams. So we set the Goal owner (goalownerid) to the specific team.
Manager is then some other user, who is controling the goals.
After the goals are properly set up, we wanted to created a new view where we want to display the goals of the team that the current user is member of.
For regular entities you can do this quite easily. Just go to the views, select filtering criteria and select Equals Current User's Team.
Here is an example of such condition for Opportunities.
|Opportunity - Owner - Condition|
The system simply does not work with this field as an owner field, but it thinks it is regular lookup to user.
The condition for Goal owner looks like this:
|Goals - Owner - Condition|
|Goals - Manager - Condition|
So after some testing and trying, we realized, that the only way how to create the desired view is to modify the customization XML. To make it very simple, we have defined the filtering condition which we needed for the Goal Owner field for the Manager field instead (eventhough it does not make sense, because there cannot be a team in that field).
Then we exported the customizations and searched for the view in there.
It looks like this:
To get the desired condition we need to replace the row with this:
<condition attribute="goalownerid" operator="eq-userteams" />
Then save the customization file and import it back.
The view will show the correct results, but be carefull, never modify this view in CRM gui, or you will loose this modification.
In this post, I have screenshots from CRM 2015, but the same behavior is for CRM 2011 and 2013 as well.
I hope this helps.