An Example of getting picklist option label:
string entityTypeName = "contact";
string columnName= "new_sex";
string columnValue= "mail";
RetrieveAttributeRequest request = new RetrieveAttributeRequest();
request.EntityLogicalName = entityTypeName;
request.LogicalName = columnName;
RetrieveAttributeResponse response = (RetrieveAttributeResponse)metadataService.Execute(request);
PicklistAttributeMetadata attribute = (PicklistAttributeMetadata)response.AttributeMetadata;
for (int i = 0; i < attribute.Options.Length; i++)
if (attribute.Options[i].Value.Value == ConvertorUtils.ToInt(columnValue))
return attribute.Options[i].Label.ToString();
return "";
}
Enjoy,
Rami Heleg.