My code:
entity["parentleadid"] = new EntityReference("lead", {GUID}); _crmConnector.service.Update(entity);
entity is Entity {Contact}
But I have error:
'contact' entity doesn't contain attribute with Name = 'parentleadid' and NameMapping = 'Logical'.
What is wrong with it?
Thank you
UPD.
Code which game me field 'parentleadid':
medatata has 'EntityMetadata' type
var lookupFields = metadata.Attributes .Where(c => ( c.AttributeType == AttributeTypeCode.Lookup || c.AttributeType == AttributeTypeCode.Customer )) .ToList();
*This post is locked for comments