jueves, 12 de septiembre de 2013

CRM 4.0 - Control de duplicados por código

 //Controlamos los duplicados
// Create the target object for the request.
CrmService.TargetCreateContact target = new CrmService.TargetCreateContact();
// Set the properties of the target object.
target.Contact = eContacto;
// Create the request object.
CrmService.CreateRequest create = new CrmService.CreateRequest();
// Set the properties of the request object.
create.Target = target;
CrmService.CreateDuplicatesOptionalParameter paramDuplicate = new CrmService.CreateDuplicatesOptionalParameter();
CrmService.PersistInSyncOptionalParameter paramSinc = new CrmService.PersistInSyncOptionalParameter();
paramSinc.Value = true;
create.OptionalParameters = new CrmService.OptionalParameter[] { paramDuplicate, paramSinc };
// Execute the request.
CrmService.CreateResponse created = (CrmService.CreateResponse)crmService.Execute(create);

No hay comentarios:

Publicar un comentario