检索在选项集字段中选择的值,并在文本字段中显示ita值 [英] retrieve the value selected in optionset field and display ita value in a text field

查看:166
本文介绍了检索在选项集字段中选择的值,并在文本字段中显示ita值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我在文本字段中显示选项集字段值吗?我想检索在选项集中选择的值,并使用插件在文本字段中显示该值.Iam在案例"实体的更新"上编写此插件...

Could any one please help me in displaying an optionset field value in a text field..? I want to retrieve the value selected in optionset and display the same in a text field using plugin.. Iam writing this plugin on "update" of "case' entity...

推荐答案

获取选项设置值:

int value = ((OptionSetValue)entity["yourattributename"]).Value;

获取文本:

String text = entity.FormattedValues["yourattributename"].ToString();

在上面的代码中,实体是Entity对象,将从中检索选项集值/文本.请用您的情况替换属性名称.

In the above code entity is the Entity object from which the optionset value/text to be retrieved. Please replace the attribute name with your case.

这篇关于检索在选项集字段中选择的值,并在文本字段中显示ita值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆