Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Access users who belong to a particular team and has certain roles.

$
0
0

Hello guys,

I am trying to access the users who belong to a particular team and has certain roles. I am using a fetch XML statement and I am being thrown an The XML passed to the platform is not well-formed XML. 

{0} - Team Name

{1,2,3,4} - Role Names. 

@"<fetch distinct='true' mapping='logical' output-format='xml-platform' version='1.0'>
<entity name='systemuser'>
<attribute name='fullname'/>
<attribute name='title'/>
<attribute name='positionid'/>
<attribute name='systemuserid'/>
<attribute name='siteid'/>
<order descending='false' attribute='fullname'/>
<link-entity name = 'teammembership' intersect = 'true' visible = 'false' to='systemuserid' from ='systemuserid'>
<link-entity name = 'team' to='teamid' from='teamid' alias = 'am'>
<filter type = 'and'>
<condition attribute = 'name' value = '{0}' operator = 'eq'/>
</filter>
</link-entity>
</link-entity>
<link-entity name='systemuserroles' to='systemuserid' from='systemuserid' intersect='true' visible='false'>
<link-entity name='role' alias='role' to='roleid' from='roleid'>
<attribute name='name'/>
<filter type='and'>
<filter type='or'>
<condition attribute='name' value='{1}' operator='eq'/>
<condition attribute='name' value='{2}' operator='eq'/>
<condition attribute='name' value='{3}' operator='eq'/>
<condition attribute='name' value='{4}' operator='eq'/>
</filter>
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>";


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images