I´m trying to copy a quote and all quote details related. I can create the quote but the quote detail gets an error (An unexpected error occurred.)
var quote = new Entity(_entityQuote.LogicalName);
quote.Id = _orgSvc.Create(quote);
quote.Attributes = _entityQuote.Attributes;
quote.Attributes.Remove("quoteid");
_orgSvc.Update(quote);
foreach (Entity entity in _entityQuoteDetails.Entities)
{
entity.Id = new Guid();
entity["quoteid"] = quote.Id;
_orgSvc.Create(entity);
}

Thanks!
*This post is locked for comments
I have the same question (0)