We have a workflow, and as part of it there are contacts getting merged. We use MergeRequest. There are custom fields on the contact entity. The merge throws an error with the name of the field causing the problem, but this is not one of our custom fields.
"Cannot specify child attributes in the columnset for Retrieve. Attribute: transactioncurrencyidname"
We filtered out this field so it would not be merged, but still see the same error on the same field.
var fields = GetFieldsToMerge(service);
var fieldNames = fields.Select(x => x.LogicalName).ToArray();
var masterContactReference = MasterContactReference.Get<EntityReference>(executionContext);
var masterContact = service.Retrieve(masterContactReference.LogicalName, masterContactReference.Id, new ColumnSet(fieldNames));
var pendingReference = PendingContactReference.Get<EntityReference>(executionContext);
var pendingContact = service.Retrieve(pendingReference.LogicalName, pendingReference.Id, new ColumnSet(fieldNames));
var merge = new MergeRequest
{
SubordinateId = pendingContact.Id,
Target = masterContactReference,
UpdateContent = masterContact
};
var merged = (MergeResponse)service.Execute(merge);