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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Script error in opportunity

(0) ShareShare
ReportReport
Posted on by 1,085

Hello Community experts

Each time i open the opportunity form I'm getting the below script error.

This is newly created sandbox

5381.ScriptErr.png

Kindly guide,

Best Regards,

Sumaira Noor

I have the same question (0)
  • Sean Kelly 1994 Profile Picture
    65 on at

    Hi Samoor if you post the log file I can take a look for you, I cant see much from the error you have posted but my Guess is you are trying to set something as a required field, if you want to use Javascript you need to do like this Xrm.Page.getAttribute("new_myfield").setRequiredLevel("required"); not "require" alternatively you can of course use business rules

  • Sumaira Noor Profile Picture
    1,085 on at

    Thanks for the response Sean

    But i haven't set up any JavaScript on this

    Because it is newly created sandbox and we have not done any customization's on it which uses script

    Kindly guide

    Best Regards,

    Sumaira Noor

  • cloflyMao Profile Picture
    25,210 on at

    Hi Sumaira,

    Try to disable browser extension such as Adblock to test whether it could work.

    Regards,

    Clofly

  • Sumaira Noor Profile Picture
    1,085 on at

    Thanks for the response clofly, there is no extension in my browser to disable.

    Kindly guide

    Best regards,

    Sumaira

  • cloflyMao Profile Picture
    25,210 on at

    Hi Sumaira,

    Could you share information from downloaded log txt file?

    Regards,

    Clofly

  • Sumaira Noor Profile Picture
    1,085 on at

    Thanks a lot for the response Clofly

    I'm pasting the error below

    Since i have no idea about the sensitive info except the URL

    I have renamed few numbers as "SOMENUMBER"

    Please do advise if any other details are required

    ReferenceError: require is not defined

       at Object.msdyn.coreCrmOpportunity.initializePage (URL/%SOMENUMBER%7d/webresources/msdyn_/Opportunity/Scripts/OpportunityCoreCrmInitialization.js:SOMENUMBER)

       at mp.executeFunction (URL/uclient/scripts/app.js?v=SOMENUMBER)

       at mp.execute (URL/uclient/scripts/app.js?v=SOMENUMBER)

       at up._executeIndividualEvent (URL/uclient/scripts/app.js?v=SOMENUMBER)

       at up._executeEventHandler (URL/uclient/scripts/app.js?v=SOMENUMBER)

       at Object.execute (URL/uclient/scripts/app.js?v=SOMENUMBER)

       at O._executeSyncAction (URL/uclient/scripts/app.js?v=SOMENUMBER)

       at O._executeSync (URL/uclient/scripts/app.js?v=SOMENUMBER)

       at O.executeAction (URL/uclient/scripts/app.js?v=SOMENUMBER)

       at t.dispatch (URL/uclient/scripts/app.js?v=SOMENUMBER)

    Best Regards,

    Sumaira Noor

  • cloflyMao Profile Picture
    25,210 on at

    Hi Sumaira,

    Is there a javascript file called OpportunityCoreCrmInitialization.js in your system?

    Try to open it via link: URL/webresources/msdyn_/Opportunity/Scripts/OpportunityCoreCrmInitialization.js

    pastedimage1585798143370v1.png

    Or find it in Sources by opening developer tool.

    pastedimage1585798304215v2.png

    Regards,

    Clofly

  • Sumaira Noor Profile Picture
    1,085 on at

    Thanks for the response Clofly

    Yes this file is present in my CRM

    Best Regards,

    Sumaira Noor

  • cloflyMao Profile Picture
    25,210 on at

    Hi Sumaira,

    Please locate to the file with following steps:

    1. In sources tab, open "Open file" search bar by clicking ellipsis button under the tab.

    pastedimage1585808917950v1.png

    2. Enter the file name in search bar, after it has been opened, right click to reveal the file in sidebar.

    pastedimage1585809065491v2.png

    3. Check whether there is a sibling file "require.js" under their parent folder msdyn_

    pastedimage1585809101674v3.png

    or search whether there are two require.js files in website source.

    pastedimage1585809326034v4.png

    From error in errorDetails.txt log and source code in OpportunityCoreCrmInitialization.js,

    the js file need a dependency library "require.js" to support "require" function in its source code.

    It seems that require.js not exists in your opportunity form resouce.

    Regards,

    Clofly

  • cloflyMao Profile Picture
    25,210 on at

    Hi Sumaira,

    Has the js library existed?

    Regards,

    Clofly

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 83

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 76 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans