Some random script error messages have started to occur since when we upgraded from CRM 2011 to CRM 2016, mainly on form Load. I tried including all dependency scripts on form properties properly but still no luck. I have gone through very good article CRM 2013 Script Loading Deep Dive shared by Scott Durow. After implementing the workaround it is showing a script error. I don't want to switch to legacy form rendering. Please suggest something I can implement. Some of Script errors in the log are:
**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)
Script Executing onLoad is:
Sonoma.namespace("Utilities").namespace("ParentProduct").extend((function () {
function func1() {
}
function func2() {
}
)());