web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Refrerence error: some function is not defined at eval.

(0) ShareShare
ReportReport
Posted on by

Hi,

i am getting error while saving the data in dyanmic crm on form save. i have created "UpdateRecordOnasave" method in the js file. Below the errror which is disaplying

ReferenceError: UpdateRecordOnasave is not defined
    at eval (eval at RunHandlerInternal (arunjatin.crm8.dynamics.com/.../ClientApiWrapper.aspx), <anonymous>:1:1)
    at RunHandlerInternal (arunjatin.crm8.dynamics.com/.../ClientApiWrapper.aspx)
    at RunHandlers (arunjatin.crm8.dynamics.com/.../ClientApiWrapper.aspx)
    at ExecuteHandler (arunjatin.crm8.dynamics.com/.../ClientApiWrapper.aspx)
    at Mscrm.TurboForm.Control.CustomScriptsManager.$C3_1 (arunjatin.crm8.dynamics.com/.../JsProvider.ashx;ids=1223231347-405283869:8907:91)
    at Mscrm.TurboForm.Control.CustomScriptsManager.executeHandler (arunjatin.crm8.dynamics.com/.../JsProvider.ashx;ids=1223231347-405283869:8853:18)
    at Mscrm.TurboForm.Control.CustomScriptsManager.executeHandlerByDescriptor (arunjatin.crm8.dynamics.com/.../JsProvider.ashx;ids=1223231347-405283869:8884:18)
    at arunjatin.crm8.dynamics.com/.../JsProvider.ashx;ids=1223231347-405283869:8892:19
    at arunjatin.crm8.dynamics.com/.../global.ashx
    at Mscrm.TurboForm.Control.Data.DataEntity.$D4_1 (arunjatin.crm8.dynamics.com/.../JsProvider.ashx;ids=1223231347-405283869:17706:13)

Please suggest me to solve this.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Fabricio Profile Picture
    35 on at
    RE: Refrerence error: some function is not defined at eval.

    I checked the quotation marks as one of the users above suggested, and that worked for me!

  • Suggested answer
    Fabricio Profile Picture
    35 on at
    RE: Refrerence error: some function is not defined at eval.

    This worked for me!

  • SudhirPr Profile Picture
    49 on at
    RE: Refrerence error: some function is not defined at eval.

    Was someone able to reach a logical resolution to this thread / original question ? I tried all the methods suggested in the thread, but keep encountering it. Any other thoughts ?

  • Suggested answer
    DebbieInTx Profile Picture
    17 on at
    RE: Refrerence error: some function is not defined at eval.

    Syntax errors seem to be the most common cause of this problem, but my code was clean and the "not defined at eval" error was sporadic; sometimes my scripts would load with no problems, sometimes one would get the error. I finally realized that I had added an assignment which referenced a function in another script to the global scope of the problematic script ... having temporarily forgotten that form "libraries" (scripts) are loaded asynchronously, so sometimes the referenced script loaded first and sometimes it didn't.

    Hope this helps someone in a similar predicament.

  • Suggested answer
    Muhammad Ainuddin Profile Picture
    104 on at
    RE: Refrerence error: some function is not defined at eval.

    Hi, try validate your javascript. Might have sintax error. You can validate it using this website. www.piliapp.com/javascript-validator

  • Community Member Profile Picture
    on at
    RE: Refrerence error: some function is not defined at eval.

    Hi

    I had the same problem. My error was also that a function was not defined.

    Solution: Make sure the function name on the form trigger is the same within your script 

    Hope it helps.

    BR Rob

  • Roxana Profile Picture
    691 on at
    RE: Refrerence error: some function is not defined at eval.

    Hi, 

    Take out or delete the comments.

    I have no errors after deleting comments.

    Regards.

  • Community Member Profile Picture
    on at
    RE: Refrerence error: some function is not defined at eval.

    John,

    Can you share the screen shot of the form properties where you specify the OnSave handler function?

    Are you getting this error while loading the form, or are you getting this error while saving?

    Thanks,

    Charmis

  • Community Member Profile Picture
    on at
    RE: Refrerence error: some function is not defined at eval.

    Please check for Double Quotes in your Script. Generally, when someone copies the code from browser and paste it, the double quotes will be different. If that is the case with you, this check will solve the problem.

  • Community Member Profile Picture
    on at
    RE: Refrerence error: some function is not defined at eval.

    Hi P NOUSHAD have you solved the error or still you are facing the same. In my case i have added jquery, Json file in form load.

    If you have already added that then can you please share your js file so that we can look into that and give you proper solution.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans