Problem with AssignRequest RRS feed

  • Question

  • Hello All,

    I'm trying to transfer some contacts from one system user to another using a console app.

    I've found plenty of examples of code and I think I have everything set up correctly. But when I make my call, I get an error message that I have not been able to find information about. I know what the message means (I've work with WCF elsewhere), but I don't know where I am supposed to make my fix.

    Here's my error message:

    Message=There was an error while trying to serialize parameter http://schemas.microsoft.com/xrm/2011/Contracts/Services:request. The InnerException message was 'Type 'Microsoft.Crm.Sdk.Messages.AssignRequest' with data contract name 'AssignRequest:http://schemas.microsoft.com/crm/2011/Contracts' is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details.

    Here's the code that I'm using:

     AssignRequest assign = new AssignRequest
                        Assignee = new EntityReference("systemuser",recipientEntity.Id),
                        Target = new EntityReference("contact",thisContact.Id)
                    // Execute the Request

    So it looks like the "KnownTypes" do not include "AssignRequest". But this doesn't make sense, since the UI can assign contacts as needed without any problems.

    Any help is appreciated!


    Monday, March 12, 2012 11:23 PM


All replies

  • Hi

    Have a look at this post:


    Hope this helps

    • Marked as answer by DadKind Tuesday, March 13, 2012 5:26 PM
    Tuesday, March 13, 2012 1:08 PM
  • Thanks for this!! 

    This works for me, however the throughput is much slower than expected. Troubleshooting that part of it next.

    Tuesday, March 13, 2012 5:27 PM
  • Hi,

    I am having the same issue, checked this blog but don't see the post?

    Could you post the solution?



    Friday, May 30, 2014 5:30 PM
  • Ah, Figured it out....

    Its a organizationrequest of type assign.


    Friday, May 30, 2014 5:48 PM