Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Lookup show "No Name" as display

$
0
0

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.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>