hello,
I'm writing this piece of code to fill a lookup field and it is working fine except that the display name of the lookup is always "no name":
//Set Masterlineid
EntityReference lookupEntity = new EntityReference();
lookupEntity.LogicalName = "quotedetail";
lookupEntity.Id = (Guid)targetEntity.Attributes["quotedetailid"];
lookupEntity.Name = (string)product.Attributes["name"];
quotedetail.Attributes["new_masterlineid"] = lookupEntity;
I also tried this :
quotedetail.Attributes["new_masterlineid"] = new EntityReference("quotedetail",(Guid)targetEntity.Attributes["quotedetailid"]);
and got the same issue.
Any help is appreciated.
*This post is locked for comments