【发布时间】:2011-10-15 19:03:27
【问题描述】:
我正在尝试从 CRM 中选择列表的描述字段中获取值,这就是我用来获取标签值的方法,我将如何更改它以获取描述值?
RetrieveAttributeRequest request = new RetrieveAttributeRequest();
request.EntityLogicalName = "opportunity";
request.LogicalName = "country";
RetrieveAttributeResponse response = (RetrieveAttributeResponse)orgService.Execute(request);
PicklistAttributeMetadata picklist = (PicklistAttributeMetadata)response.AttributeMetadata;
foreach (OptionMetadata option in picklist.OptionSet.Options)
{
string picklistlabel = option.Label.UserLocalizedLabel.Label.ToString();
if (p.Column_16.ToString().ToUpper() == picklistlabel.ToString().ToUpper())
{
countryid= option.Value;
}
}
谢谢!
【问题讨论】:
标签: dynamics-crm dynamics-crm-4 dynamics-crm-2011