Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
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
    Sandy Hello Profile Picture
    Sandy Hello 340 on at
    RE: Throwing script error when trying to open opportunity record

    Hi Daniel thanks for your response, the issue is related recent Microsoft Field Services upgrade, raised Microsoft ticket and they resolved it

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Throwing script error when trying to open opportunity record

    Hi,

    can you Please share source code to check this issue further.

    Please mark my answer verified if i were helpful

  • Daniel Schneider Profile Picture
    Daniel Schneider 170 on at
    RE: Throwing script error when trying to open opportunity record

    Hi,

    do you add a parameter in you function?

  • Sandy Hello Profile Picture
    Sandy Hello 340 on at
    RE: Throwing script error when trying to open opportunity record

    Hi Bipin thanks for your response, I have already checked the checkbox but still the script error is occuring

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Throwing script error when trying to open opportunity record

    Hi,

    To fix this please select checkbox to pass execution context as first parameter.

    xrmdynamicscrm.wordpress.com/.../

    Please mark my answer verified if i were helpful

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

Featured topics

Product updates

Dynamics 365 release plans