Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

ReferenceError: 'Form_onload' is undefined at eval code (eval code:1:1)

Posted on by 1,771

Hi,

I am getting below error after upgrade CRM 2015 to CRM 2016 when run java script functions.   Upgrade completed without any error. Kindly help me to solve this issue.

Please find the screen-shots for your reference.  Let me know if you need any more clarification on this issue.

5633.j1.png

js10.png

js11.png

j12.png

*This post is locked for comments

  • Suggested answer
    Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: ReferenceError: 'Form_onload' is undefined at eval code (eval code:1:1)

    My suggestion is to remove all the code, then just create empty function called Form_onload. If this one working fine, it is likely because of wrong code on your file. Something like not close properly.

  • Suggested answer
    SunilJ Profile Picture
    SunilJ 10 on at
    RE: ReferenceError: 'Form_onload' is undefined at eval code (eval code:1:1)

    This issue occurrence some time in the form if the form is not published properly or some issue or upgrade time.

    If you think your java script working earlier and suddenly this issue occurred in your form , remove your code from the OnLoad method from your javascript publish the code. Run your form see if the error go out. Again add your form load code into your script and publish. I did this for me the issue didn't appear after adding load code.

    On another scenario you will see this error if any unsupported javascript code in your script file. 

  • Suggested answer
    Vipin J Profile Picture
    Vipin J 1,583 on at
    RE: ReferenceError: 'Form_onload' is undefined at eval code (eval code:1:1)

    Can you check if you are passing any parameter without single quote.

    I got somewhat same error and resolved using passing the parameter to the method in a single quotes.

  • P NOUSHAD Profile Picture
    P NOUSHAD 1,771 on at
    RE: ReferenceError: 'Form_onload' is undefined at eval code (eval code:1:1)

    Hi,

    The solution is delete the main library from form properties and add again.

    Regards,

    Noushad

  • prt33k Profile Picture
    prt33k 6,907 on at
    RE: ReferenceError: 'Form_onload' is undefined at eval code (eval code:1:1)

    looks more of formatting issue... if function is defined then it will be available.

    Can you try pasting the script in JS editor and check if it is fine?

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: ReferenceError: 'Form_onload' is undefined at eval code (eval code:1:1)

    Noushad,

    If nobody answered what's the point in opening of new thread? Isn't it more logical to update previously opened thread with new details or just some dummy reply to move it up?

    If nobody knows the answer here I would suggest to get in touch with Microsoft Support and open support ticket.

    Good luck.

  • P NOUSHAD Profile Picture
    P NOUSHAD 1,771 on at
    RE: ReferenceError: 'Form_onload' is undefined at eval code (eval code:1:1)

    Hi Andrii,

    I did not get any response this issue.  Since it is critical kindly help me to solve this.  No java functionalities working after upgrade CRM 2015 to CRM 2016.  What could be the reason.

    Regards,

    Noushad

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: ReferenceError: 'Form_onload' is undefined at eval code (eval code:1:1)

    Hello,

    You posted pretty similar question here - community.dynamics.com/.../231523 Has anything changed since then?

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans