Hi,
I want to create an account record which is a copy of an existing account. So i am using InitializeFromRequest class. When i create the record the attributes are not copying at all. Below is the code.
Account acc = new Account();
acc.Name = "Xyz";
acc.AccountNumber = "6789";
acc.Id = service.Create(acc);
InitializeFromRequest req = new InitializeFromRequest();
req.TargetEntityName = "account";
// req.TargetFieldType = TargetFieldType.All;
req.EntityMoniker = new EntityReference("account", acc.Id);
// Execute the request
InitializeFromResponse resp =
(InitializeFromResponse)service.Execute(req);
Guid newEntityId = service.Create(resp.Entity);
Any help on this is much appreciated.
Kruthi Hegde