Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

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

(0) ShareShare
ReportReport
Posted on by 645

I have a strange problem, when I open a telephone form for the first time (create) I get an error :

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

I tried :

put the onload code as a note ( \\) 

deleteing the connection from JS to the form
nothing helped and I can't debug (will not stop in breakpoints...) 

I just get the same msg again and again..
What can I do? it makes no sense..

the full Error:

TypeError: Unable to get property 'OnLoad' of undefined or null reference
at eval code (eval code:1:1)
at RunHandlerInternal (https://qacrm/crm3/form/ClientApiWrapper.aspx?ver=-591919025:158:1)
at RunHandlers (https://qacrm/crm3/form/ClientApiWrapper.aspx?ver=-591919025:117:1)
at OnScriptTagLoaded (https://qacrm/crm3/form/ClientApiWrapper.aspx?ver=-591919025:232:1)
at Anonymous function (https://qacrm/crm3/form/ClientApiWrapper.aspx?ver=-591919025:201:1)

*This post is locked for comments

  • sahara Profile Picture
    645 on at
    RE: Unable to get property 'OnLoad' of undefined or null reference at eval code (eval code:1:1)

    Goutam - to create a new  JS with onlad and thats all ? another thing - it doesn't repeat in every user or in every time... by the way is there anyconnection to IE or Chrome?

    it seems like working good in CHROME but not in IE..

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Unable to get property 'OnLoad' of undefined or null reference at eval code (eval code:1:1)

    Try to attach new  JS web resource and put your function there , make sure you put the JS in VS editor before paste in the web resource .

  • sahara Profile Picture
    645 on at
    RE: Unable to get property 'OnLoad' of undefined or null reference at eval code (eval code:1:1)

    Hey Goutem I checked it. the function exists and it connected to my form... what else can I check?

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Unable to get property 'OnLoad' of undefined or null reference at eval code (eval code:1:1)

    Are you sure the method you triggered in on-load event is exists in the form library. Please check the library added in the form or not and also check the OnLoad function available in the library.

  • sahara Profile Picture
    645 on at
    RE: Unable to get property 'OnLoad' of undefined or null reference at eval code (eval code:1:1)

    Hey Priyesh the code works fine after reloading or after F5 few times by the way the code works well in an other enviroment...I will check the loading as well and will let you know in a few minutes

  • Suggested answer
    Priyesh Profile Picture
    7,396 User Group Leader on at
    RE: Unable to get property 'OnLoad' of undefined or null reference at eval code (eval code:1:1)

    Hi,

    It looks like your JS script file didn't find the exact file or the function inside it. And hence, it is giving you this error. Check these things -

    1. Where you are calling the function

    2. How is the function defined in the JS file. And also, does the file load when you load the form.

    Please paste screenshot if not clear. I would be able to suggest better in that case.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans