Hello Community experts
Each time i open the opportunity form I'm getting the below script error.
This is newly created sandbox
Kindly guide,
Best Regards,
Sumaira Noor
Hello Community experts
Each time i open the opportunity form I'm getting the below script error.
This is newly created sandbox
Kindly guide,
Best Regards,
Sumaira Noor
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
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
But i cant find it here
Found one require.js which is not under folder msdyn_
Please guide,
Best regards,
Sumaira Noor
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.
Hi Sumaira,
Has the js library existed?
Regards,
Clofly
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.
2. Enter the file name in search bar, after it has been opened, right click to reveal the file in sidebar.
3. Check whether there is a sibling file "require.js" under their parent folder msdyn_
or search whether there are two require.js files in website source.
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
Thanks for the response Clofly
Yes this file is present in my CRM
Best Regards,
Sumaira Noor
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
Or find it in Sources by opening developer tool.
Regards,
Clofly
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
Hi Sumaira,
Could you share information from downloaded log txt file?
Regards,
Clofly
Thanks for the response clofly, there is no extension in my browser to disable.
Kindly guide
Best regards,
Sumaira
André Arnaud de Cal...
292,865
Super User 2025 Season 1
Martin Dráb
231,723
Most Valuable Professional
nmaenpaa
101,156
Moderator