Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Error with this field's customized event - closed opportunities only

Posted on by 602

I am getting the attached error when I view a closed opportunity.  I tried to debug the error and found the attached.  Can anyone help me decipher why this happens on closed opportunities?

At first I thought it was related to a custom business process flow I am testing, but it also happens with old opportunities that were closed before the bpf was used.

Any help will be greatly appreciated.

5342.Capture.JPG

*This post is locked for comments

  • Barbara Forsman Profile Picture
    Barbara Forsman 602 on at
    RE: Error with this field's customized event - closed opportunities only

    Thank you thank you thank you!  I re-added some system fields that had been removed from the form and that solved the issue!

  • Loic Orue Profile Picture
    Loic Orue 925 on at
    RE: Error with this field's customized event - closed opportunities only

    I'm having the same issue since a couple of days as well. Have you managed to find a solution?

  • Verified answer
    Waqar Sohail Profile Picture
    Waqar Sohail on at
    RE: Error with this field's customized event - closed opportunities only

    Dear Barbara,

    I believe some system field is removed from Form which is required by System Script, Can you please go to form customization and try to add missing fields.

    Or can you share list of un-used fields from Form Customization which are on right side?

    Here is the same thread which I face few year ago!

    community.dynamics.com/.../143569

  • Barbara Forsman Profile Picture
    Barbara Forsman 602 on at
    RE: Error with this field's customized event - closed opportunities only

    Thank you!  I did confirm I was getting the error on my "NLK Opp Form 2017" and there are no OnLoad event handlers on the NLK Opp Form 2017.  

    6170.Capture.JPG

    I did look in my Web Resources and checked dependencies for all the scripts.  There is only one script that is unmanaged that had a dependency on the inactive "Information" form.  I removed the script, saved, published, opened a new InPrivate window to test, and I get the same error.    :(

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Error with this field's customized event - closed opportunities only

    If it's coming from "your" scripts, then, at least, you should be able to see those scripts among the libraries. How did you get to the form designer? Could you confirm it's the same form in the form designer as the one showing the error? (Unless you opened form designer from the solution, 365 will bring up the top-most form when you click "form" button - that form can be different from what you had open on the screen)

  • Barbara Forsman Profile Picture
    Barbara Forsman 602 on at
    RE: Error with this field's customized event - closed opportunities only

    I actually don't have any Form OnLoad Events for the Opportunity form.

    0702.Capture.JPG

    Since the error I receive says the following, is there a different place to looks for window onload events? 

    "There was an error with this field's customized event. 

    Field:  window 

    Event:  onload

    Error: Unable to get property 'controls' of undefined or null reference"

    Many thanks for your help!

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Error with this field's customized event - closed opportunities only

    Sure - just open the form in the designer, open form properties, make sure you are looing at the onload event handlers  double click on any of them - there will be "Enabled" checkbox (just where you are normally entering the function name)

    Don't forget to publish those changes..

    And, maybe, reopen the browser (or use a private session). Sometimes, the cache does not get cleared right away.

  • Barbara Forsman Profile Picture
    Barbara Forsman 602 on at
    RE: Error with this field's customized event - closed opportunities only

    There are a few scripts attached.  Is there a way to disable them one by one so I can find the culprit?

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Error with this field's customized event - closed opportunities only

    Hi Barbara,

     are there any scripts attached to the opportunity form? They probably should not be doing whatever it is they are doing when the opportunity is closed/readonly

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