有没有办法在MS CRM中检索字段的显示名称?到目前为止,我只能得到模式名称;但我希望能够显示更多用户友好的内容。下面的示例将返回hc_billtimeunit3
,但想要返回bill time unit
。在Dynamics CRM 2016中获取字段的显示名称
Xrm.Page.getAttribute("hc_billtimeunit3").getName()
有没有办法在MS CRM中检索字段的显示名称?到目前为止,我只能得到模式名称;但我希望能够显示更多用户友好的内容。下面的示例将返回hc_billtimeunit3
,但想要返回bill time unit
。在Dynamics CRM 2016中获取字段的显示名称
Xrm.Page.getAttribute("hc_billtimeunit3").getName()
您可以使用下面的代码片段获取标签文本。
Xrm.Page.getControl("attibutename").getLabel();
或
Xrm.Page.ui.controls.get("attibutename").getLabel();
两者都是工作无缝对我来说,作为Xrm.Page.getControl
方法是一种快捷的方法来访问Xrm.Page.ui.controls.get
从CRM实体定制得到显示名称,则可能需要其他服务呼叫。
Xrm.Page.ui.controls.get(“attibutename”)。getLabel(); 这实际上为我工作。
刚刚返回[object]给我,但是Xrm.Page.ui.controls.get(“attibutename”)。getLabel();成功了! – amberl
Xrm.Page.getControl(“attibutename”)将返回[object]。 Xrm.Page.ui.controls.get(“attibutename”)将返回[object]。 –