Ever since our upgrade from CRM 2011 to CRM 2016, we've been encountering random script error messages during form loading. Despite properly including all dependency scripts in the form properties, we haven't been able to resolve the issue. I came across a helpful article by Scott Durow titled CRM 2013 Script Loading Deep Dive. However, even after implementing the suggested workaround, we are still seeing script errors. We are hesitant to switch to legacy form rendering and are seeking suggestions for alternative solutions. Some of the script errors logged include:
**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)
The script currently executing onLoad is:
Sonoma.namespace("Utilities").namespace("ParentProduct").extend((function () {
function func1() {
}
function func2() {
}
)());