Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 9244

clone account gives sql server error in mscrm 2013

$
0
0
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);

Viewing all articles
Browse latest Browse all 9244

Trending Articles