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 :
Customer experience | Sales, Customer Insights,...
Answered

Script Error on Lead Forms. Help needed!

(0) ShareShare
ReportReport
Posted on by 95

Hello,

I am getting two different kind of error messages on two different browsers (Firefox, Chrome) It happens when I open a lead only.

CHROME ERROR:
Script Error
One of the scripts for this record has caused an error. For more details, download the log file.
ReferenceError: MarketingSales is not defined at eval (eval at RunHandlerInternal (xyzcompany.crm4.dynamics.com/.../ClientApiWrapper.aspx, <anonymous>:1:1)

FIREFOX ERROR:
One of the scripts for this record has caused an error. For more details, download the log file.
@mirava.crm4.dynamics.com/.../ClientApiWrapper.aspx line 160 > eval:1:1 RunHandlerInternal@https://mirava.crm4.dynamics.com/form/ClientApiWrapper.aspx?ver=-759845529:160:1

 

xyz.JPG

I have no idea how to fix this as I have also checked the form properties (attached) and there is nothing that would cause this issue. Any help is highly appreciated.

Thanks...

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Script Error on Lead Forms. Help needed!

    Hello,

    It looks like a bug. Get in touch with Microsoft and open a ticket to resolve your issue.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Script Error on Lead Forms. Help needed!

    Hello,

    It looks like a bug. Get in touch with Microsoft and open a ticket to resolve your issue.

  • Verified answer
    ba365guy Profile Picture
    2,950 on at
    RE: Script Error on Lead Forms. Help needed!

    Hi yucelm

    Same issue was faced by other users too on upgrade of 8.2 to 9.0

    Suggested solution 1: https://aslamsumayya.wordpress.com/2018/03/15/dynamics-365-crm-how-to-resolve-script-error-while-saving-leads/

    Suggested solution 2: Please read through this thread and try out the solution suggested in this: https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/271734/dynamics-365-instance-upgrade-to-v9-issue/804432

    Should work!!

    Finally, if nothing works, please contact MS Support.

  • Suggested answer
    Mustafa Sabir Profile Picture
    on at
    RE: Script Error on Lead Forms. Help needed!

    Hi,

    The error occurs because formxml of affected form might have been customized.
    Please check if below tag is present in customization.xml of lead form.
    <clientresources>
        <internalresources>
         <clientincludes>
          <internaljscriptfile src="$webresource:LeadManagement/Lead/Lead_main_system_library.js" />
         </clientincludes>
        </internalresources>  
    </clientresources>
    which should be present to load the lead_main_system_library.
  • Suggested answer
    ashish12 Profile Picture
    3,079 on at
    RE: Script Error on Lead Forms. Help needed!

    community.dynamics.com/.../804432

  • yucelm Profile Picture
    95 on at
    RE: Script Error on Lead Forms. Help needed!

    Solution #2 worked like a charm. I created a new solution "lead" exported it, commented out "marketingSales" sections and imported it again. All errors dissapperaed. Thanks a lot.

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 179 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 110

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 61 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans