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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

JavaScript function is undefined

(0) ShareShare
ReportReport
Posted on by 92

Hi everyone,

I tried to implement some business logic with JAVASCRIPT on form and fields. The JS don't work in Chrome. And I logged in with Edge, all the functions work except one triggered by onsave event invoking another funtion.

.7140.2.JPG

5482._5563B783_.JPG

6787.5.JPG

0412.4.JPG

*This post is locked for comments

I have the same question (0)
  • Charlie Chen Profile Picture
    92 on at

    When click "ValidateRetailCurrentPricing" on the upper code block on Edge debugger, it doesn't sense the lower code block definig the function.

  • Community Member Profile Picture
    on at

    Did you tick the “Pass execution contact as first parameter” option?

    Kindly follow below link for more information.

    community.dynamics.com/.../javascript-prevent-save

  • Suggested answer
    nghieppham Profile Picture
    4,755 on at

    Hi Charlie,

    You should use Console.Log(Your log content) to log line by line to see problem. I do not see any issue with your code.

    Second way, please download the log file that system informed you, look at it in detail or share to us. We will check together.

  • Verified answer
    Community Member Profile Picture
    on at

    The Error you are getting is a reference error. It means that either your function has incorrect syntax or your library has incorrect syntax. Please check the whole script of your library for any sysntax error. You will also get a popup to send the error details. Open the error details there and check which line is not incorrect.

  • Charlie Chen Profile Picture
    92 on at

    Hi Kiran, I tried to tick the option, but it didn't work. Thanks.

  • Charlie Chen Profile Picture
    92 on at

    Hi Saad, I did find some syntax error,like double quote and missing curly brace. Thanks a lot for your tips.

  • Community Member Profile Picture
    on at

    Please mark the answer verified it if helped.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans