Hi,
I'm trying to bulk create multiple records using the ExecuteMultipleRequest. Unfortunatelly it fails with the following error message:
"The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter schemas.microsoft.com/.../Services:request. The InnerException message was 'Error in line 1 position 12629. Element 'schemas.microsoft.com/.../Services:request' contains data from a type that maps to the name 'schemas.microsoft.com/.../Contracts:ExecuteMultipleRequest'. The deserializer has no knowledge of any type that maps to this name. Consider changing the implementation of the ResolveName method on your DataContractResolver to return a non-null value for name 'ExecuteMultipleRequest' and namespace 'schemas.microsoft.com/.../Contracts'.'. Please see InnerException for more details."
Here my sample code:
var multipleRequest = new ExecuteMultipleRequest();
multipleRequest.Settings = new ExecuteMultipleSettings
{
ContinueOnError = false,
ReturnResponses = true
};
multipleRequest.Requests = new OrganizationRequestCollection();
foreach (var r in dataCollection)
{
var newEntity = new Entity("my_entity");
newEntity["new_contact"] = new EntityReference("contact", r.ContactId);
var req = new CreateRequest();
req.Target = newEntity;
multipleRequest.Requests.Add(req);
}
_organizationServiceProxy.EnableProxyTypes();
var response = (ExecuteMultipleResponse)_organizationServiceProxy.Execute(multipleRequest);
var results = response.Results;
*This post is locked for comments
I have the same question (0)