ラベル名を取得するには、metadataserviceを使用する必要があります。これについてはコードを確認してください。
C#:
RetrieveAttributeRequest request = new RetrieveAttributeRequest {
EntityLogicalName = entityName,
LogicalName = attributeName,
RetrieveAsIfPublished = true
};
RetrieveAttributeResponse response = (RetrieveAttributeResponse)service.Execute(request);
PicklistAttributeMetadata metadata = (PicklistAttributeMetadata)response.AttributeMetadata;
OptionMetadata[] optionList = metadata.OptionSet.Options.ToArray();
foreach (OptionMetadata option in optionList) {
//option.Value - Value of option
//option.Label.UserLocalizedLabel.Label - Label name of that value
}
値を知っているだけでフォームにないラベルテキストを知りたい場合は、Javascriptでこれを使用してください。
オプションセットのテキストを取得したいフォームにいる場合は、次のようにするだけです。
Xrm.Page.getAttribute("optionsetfieldname").getText();