Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Random Script Error on CRM 2016 Forms

Posted on by Microsoft Employee

Hi Experts,

Some random script error messages are started popup since when we upgraded from CRM 2011 to CRM 2016.

Mainly on form Load, Tried with including all dependency script on form properties properly but still no luck, gone through very good article CRM 2013 Script Loading Deep Dive shared by ScottDurow after implementing the workaround showing script error, don't wanted to switch to legacy form rendering. Please suggest something I will implement. Some of Script errors with 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)

 

My Script Executing onLoad is like

Sonoma.namespace("Utilities").namespace("ParentProduct").extend((function () {

function func1() {

}

function func2() {

}

)());

*This post is locked for comments

  • Suggested answer
    ThomasN Profile Picture
    ThomasN 3,190 on at
    RE: Random Script Error on CRM 2016 Forms

    Hi Setu,

    It seems you need to identify the namespace for the javascript file be run onloadevent. See this article: msdn.microsoft.com/.../gg309562.aspx

    Let me know where this gets you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans