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

Announcements

No record found.

News and Announcements icon
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...

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    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

    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

    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
    Microsoft Employee on at

    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
  • yucelm Profile Picture
    95 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 108 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 79

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 58 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans