Dear all ;
i am trying to clone an account record through the following code but it gives sql server error
Entity acc = service.Retrieve(entity.LogicalName, entity.Id, new ColumnSet(true));
Entity Account = new Entity("account");
acc.Attributes.Remove("accountid");
acc.Id = Guid.NewGuid();
Account = acc;
Account["name"] = "Cloned"+ " " + acc.Attributes["name"];
service.Create(Account);
i am trying to clone an account record through the following code but it gives sql server error
Entity acc = service.Retrieve(entity.LogicalName, entity.Id, new ColumnSet(true));
Entity Account = new Entity("account");
acc.Attributes.Remove("accountid");
acc.Id = Guid.NewGuid();
Account = acc;
Account["name"] = "Cloned"+ " " + acc.Attributes["name"];
service.Create(Account);