CRM 2016表单上的随机脚本错误

时间:2017-01-06 16:26:59

标签: javascript customization dynamics-crm-2016

自从我们从CRM 2011升级到CRM 2016以来,一些随机脚本错误消息已经开始发生, 主要是表单Load。我尝试在表单属性上正确包含所有依赖脚本,但仍然没有运气。我已经阅读了Scott Durow分享的非常好的文章CRM 2013 Script Loading Deep Dive。实现解决方法后,它显示脚本错误。我不想切换到传统表单呈现。请提出我可以实施的建议。日志中的一些脚本错误是:

**TypeError: Cannot read property 'ParentProduct' of undefined
at eval (eval at RunHandlerInternal (192.168.220.55/.../ClientApiWrapper.aspx), <anonymous>:1:13)**

at RunHandlerInternal (192.168.220.55/.../ClientApiWrapper.aspx)
at RunHandlers (192.168.220.55/.../ClientApiWrapper.aspx)
at OnScriptTagLoaded (192.168.220.55/.../ClientApiWrapper.aspx)
at http://192.168.220.55/Dev/form/ClientApiWrapper.aspx?ver=191855143:201:1

**TypeError: Unable to get property 'executeOnLoad' of undefined or null reference
at eval code (eval code:1:1)**

at RunHandlerInternal (192.168.220.55/.../ClientApiWrapper.aspx)
at RunHandlers (192.168.220.55/.../ClientApiWrapper.aspx)
at OnScriptTagLoaded (192.168.220.55/.../ClientApiWrapper.aspx)
at Anonymous function (192.168.220.55/.../ClientApiWrapper.aspx)

脚本执行onLoad是:

   Sonoma.namespace("Utilities").namespace("ParentProduct").extend((function () {
        function func1() {
        }
        function func2() {
        }
        )());

2 个答案:

答案 0 :(得分:1)

您是否已联系Sonoma报告与其代码相关的错误?有了这个命名空间,我不得不假设他们是作者。 http://www.sonomapartners.com/

答案 1 :(得分:0)

您可能想要检查脚本加载的时间 - 我怀疑Sonoma.namespace(“Utilities”)是在另一个可能尚未加载的脚本文件中定义的。