I'm using CRM 2015 SDK for my plugin. I want the attributes of entity reference in my code. I'm able to get the Guid and Logical Name. But the name returns null for all the entity reference fields. Here is my code:
EntityReference centre= ((EntityReference)quoteEntity.Attributes["mc_centre"]); Guid centreGuid = centre.Id; //returns Guid string centreName = centre.Name; //returns null
I have checked the Referenced Entity, "Centre" which uses the 'name' field and has valid value. Has anyone faced the same issue? Am I doing something wrong in my code? I don't want another service call to get the name btw.