Hey, I am creating a new record and updating it according to another record, but I get the msg, how to solve it ?
My Code:
public void Clone(Entity firstNeeds, IOrganizationService Service) { Entity newneeds = new Entity(new_needs.EntityLogicalName); Guid globalSettingId = Service.Create(newneeds); Entity newRec = Service.Retrieve(new_needs.EntityLogicalName, globalSettingId, new ColumnSet(true)); foreach (KeyValuePair<String, Object> attribute in firstNeeds.Attributes) { string attributeName = attribute.Key; object attributeValue = attribute.Value; newRec[attributeName] = attributeValue; } try { Service.Update(newRec); } catch (FaultException<OrganizationServiceFault> ex) { throw new InvalidPluginExecutionException("An error occurred in the Clone function.", ex); } }