這裏有一個LINQ到CRM查詢:的EntityReference屬性並不總是完全填充
Contact crmContact = xrm.ContactSet.Where(x => x.ContactId == contactId).SingleOrDefault();
我有一個屬性,EntityReference
,因爲這樣的:
crmContact.assigned_clinic;
如你所知,一個EntityReference
包含這些屬性:
- Id (the Guid of the entity that it refers to)
- LogicalName (what type of entity does this reference references to)
- Name (the 'Name' attribute of the entity that's being refered to)
由於某些原因,我不能把我的手指o n,在某些情況下,LogicalName
和Name
屬性正確填充,有時它們是空字符串。
強制完全檢索數據的任何想法?