locked
retrieve OptionSet label in CRM 2011 RRS feed

  • Question

  • Here's the 2011 code to find the int value

                       string statuscode = myDE3.Attributes.Contains("statuscode") ? ((OptionSetValue)myDE3.Attributes["statuscode"]).Value.ToString() : string.Empty;
    
    

    How do we retrieve the label without making a call to the metadata?  Here's the CRM 4 code:

     string myCaseType = myIncident.Properties.Contains("casetypecode") ? ((Picklist)myIncident.Properties["casetypecode"]).name : string.Empty;
    

    Thanks for reading

    Wednesday, January 25, 2012 4:56 PM

Answers

All replies