Skip to main content

Notifications

Announcements

No record found.

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,081

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

  • cloflyMao Profile Picture
    25,202 on at
    RE: Script error in opportunity

    Hi Sumaira,

    According to what I found in my environment and your issue, 

    I think OpportunityCoreCrmInitialization.js and require.js should be in same parent folder msdyn_, because require.js is dependency library to execute "require" function in the first js.

    expected path for two files(from my environment):

    https://org.crm.dynamics.com/{number}/webresources/msdyn_/Opportunity/Scripts/OpportunityCoreCrmInitialization.js
    
    https://org.crm3.dynamics.com/{number}/webresources/msdyn_/Libraries/require/require.js

    It seems that path of the library was not proper, so I suggest you open a support ticket for your sandbox environment.

    Regards,

    Clofly

  • Sumaira Noor Profile Picture
    1,081 on at
    RE: Script error in opportunity

    Thanks for the response Clofly and Goutam

    Sorry for the delayed response I was on sick leave.

    I have require.js in the web resource area of CRM

    require1.PNG

    But i cant find it here

    req3.PNG

    Found one require.js which is not under folder msdyn_

    req4.PNG

    Please guide,

    Best regards,

    Sumaira Noor

  • Suggested answer
    gdas Profile Picture
    50,089 Moderator on at
    RE: Script error in opportunity

    Hi ,

    Do you have any other environment? Try to compare the JS library with another environment and add if any missing library.

    You can also refer trial instance if you dont have any existing instance.

  • cloflyMao Profile Picture
    25,202 on at
    RE: Script error in opportunity

    Hi Sumaira,

    Has the js library existed?

    Regards,

    Clofly

  • cloflyMao Profile Picture
    25,202 on at
    RE: Script error in opportunity

    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

  • Sumaira Noor Profile Picture
    1,081 on at
    RE: Script error in opportunity

    Thanks for the response Clofly

    Yes this file is present in my CRM

    Best Regards,

    Sumaira Noor

  • cloflyMao Profile Picture
    25,202 on at
    RE: Script error in opportunity

    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,081 on at
    RE: Script error in opportunity

    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,202 on at
    RE: Script error in opportunity

    Hi Sumaira,

    Could you share information from downloaded log txt file?

    Regards,

    Clofly

  • Sumaira Noor Profile Picture
    1,081 on at
    RE: Script error in opportunity

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

    Kindly guide

    Best regards,

    Sumaira

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,865 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans