Friday 15 July 2011

Retrieving display value of lookup field in Dynamics CRM C# plugin -


I am trying to retrieve the display value of the lookup field in a plugin for MS Dynamics CRM 4.0. The value of the attribute is a GUID that indicates to another entity (the owner of the sale in this case). The "normal" attribute I get from a code like this:

  CRMDTime serviceOrDRDATT = (CRMDTime) unit ["Submit"]; ServiceOrderDate = serviceOrderDateDT.Value.ToString ();  

Any ideas on how to do this for the display value of the lookup field?

  owner's owner lookup = (owner) unit ["owner"]; String owner name = owner lookup.name;  

No comments:

Post a Comment