Hi,
I am working with Dynamics CRM annotation, i develop an external application that use the organization service in order to create new annotation linked to a custom entity and linked to the user based on the user id, by set the CallerId in the organization Service and by set the field "CreatedBy" in annotation on create.
The problem is that the annotation is created but sometimes the created by is not correct and it randomly set it by another user.
Guid callerID = new Guid(HttpContext.Current.Request.QueryString["CallerId"].ToString()); CrmServiceClient connection = new CrmServiceClient(connectionString); OrganizationServices = connection.OrganizationServiceProxy; OrganizationServices.CallerId = new Guid(callerID); . . . Entity Annotation = new Entity("annotation"); Annotation.Attributes["objectid"] = new EntityReference("RelatedEntityLogical", RelatedEntity.Id); Annotation.Attributes["objecttypecode"] = RelatedEntity.LogicalName; . . . Annotation.Attributes["createdby"] = new EntityReference("systemuser", callerID); OrganizationServices.Create(Annotation);
Any Ideas?
Regards,