Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Throwing script error when trying to open opportunity record

Posted on by 340

When i am trying to open the opportunity record script error is thrown. Below are the details. I am not sure how to fix below issue,pls let me know how to fix this issue

One of the scripts for this record has caused an error. For more details, download the log file.
Cannot read property 'getFormContext' of undefined
Session Id: 
Correlation Id: 
Event Name: onload
Web Resource Name: msdyn_/Opportunity/Opportunity.Library.js
Solution Name: msdyn_FieldService_patch_update
Publisher Name: microsoftdynamics

Error File

TypeError: Cannot read property 'getFormContext' of undefined
at Function.t.Load 

  • Suggested answer
    protc Profile Picture
    protc on at
    RE: Throwing script error when trying to open opportunity record

    Hi Sandy,

    Thank you for your query.

    Please verify if the "Use the Pass execution context as first parameter" option in the Handler Properties dialog is checked on Web Resource Name: msdyn_/Opportunity/Opportunity.Library.js,

    docs.microsoft.com/.../clientapi-execution-context

  • Pankaj Gogoi Profile Picture
    Pankaj Gogoi 3,177 on at
    RE: Throwing script error when trying to open opportunity record

    Hello Sandy,

    Can you provide detail on the version you are using? is it happening for all opportunities record or any specific record.

    You can open the developer console and see if any additional errors are logged. You can clear your browser cache and try loading an opportunity.

    Best Regards

    PG

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans