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

oData expand query not working on SystemUserRolesSet

$
0
0

Hello,

I'm trying to get the current user's roles, and the data about said roles in one query (as opposed to using Xrm.Page.context.getUserRoles and then looping through all the results and querying the endpoint for each contained role using its ID).

I'm using Microsoft XRM tools (in CRM 2016) and the query it generates looks legit:

 

xrmservices/2011/OrganizationData.svc/SystemUserRolesSet?$select=systemuserroles_association/Name&$expand=systemuserroles_association&$filter=SystemUserId%20eq%20guid%27436CD5A4-FD15-E611-80C1-00155D7B5806%27

If I look at the class SystemUserRole generated by CrmSvcUtil, there seems to be such a property (systemuserroles_association) but it looks like the SVC endpoint isn't using the same class definition.

Any ways of pulling this off ?


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>