locked
weird service retrieve error RRS feed

  • Question


  • Hello - I'm using the following query to get the domainname for a user guid:

    var domainName = 
        context.OrganizationService.Retrieve(
        SystemUser.EntityLogicalName, userGuid, new ColumnSet(new string[] { "DomainName" }))
        .ToEntity<SystemUser>().DomainName;

    However, this query is returning the following error:

    Exception: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: 'SystemUser' entity doesn't contain attribute with Name = 'DomainName'. 

    SystemUser does have a DomainName field, I even double checked the spelling.  So do you have any idea why the query above might be throwing the exception above?
    Friday, September 6, 2013 5:27 PM

Answers

All replies