crm 2011 中的 getControl.setDefaultView 会导致错误

getControl.setDefaultView in crm 2011 causes an error

本文关键字:错误 setDefaultView 2011 中的 getControl crm      更新时间:2023-09-26

我用了

document.getElementById("customerid").setAttribute("defaulttype", "2");
document.getElementById("customerid").setAttribute("lookuptype", "2");
Xrm.Page.getControl("customerid").setDefaultView("{A9AF0AB8-xxxx-xxxx-xxxx-C6281FED7FAB}");

Form_onchange() 中,它给了我这个错误:

对象不支持此属性或方法"。

如果我关闭弹出窗口,程序实际上可以正常工作。

可能有什么问题?

附言我正在运行IE9,错误消息未指定不支持哪种方法。

"{A9AF0AB8-xxxx-xxxx-xxxx-C6281FED7FAB}" 不是有效的 GUID。 请确保使用视图的确切 GUID。

好吧,我从未见过任何人 X 退出 GUID...

无论如何,取出第 2 行,看看是否有效。 我检查了一些代码,我有第 1 行和第 3 行。

此外,您的查找需要已经能够在界面中从帐户切换到联系人(键入代码 1 -> 2)(作为用户而不是通过 javascript)。