While recently working with a Microsoft Dynamics CRM 2013 online environment, an error appeared on the Opportunity form.

“There was an error with this field’s customized event.
Field:window
Event:onload
Error:Object doesn’t support property or method ‘Form_onload’

This was a rather surprising error because there were only a few customizations on the Opportunity form and there was no custom code. After several failed attempts to remedy this by adding and removing fields, I started searching online. I was fortunate to find the thread, CRM 2013: Strange ‘Form_onload’ error message in opportunity, that provided a suggestion to update the XML due to missing references to system JavaScript. As easy as that may sound to some, implementation of the fix was not that straight forward. So here is how to fully fix the issue.

Within Dynamics CRM, navigate to Settings -> Solutions

  • Create a new solution and only add the opportunity entity.
  • Choose to not include the dependencies.
  • Export the solution as an unmanaged solution.
  • Download the solution’s zip file and extract it.
  • Open the Customizations.xml file.
  • Search within the customization file for the <clientincludes tag.
  • This is where the XML is missing. There may be several instances where the code will look like this:

<clientincludes />

  1. Replace the <clientincludes /> tag with the following XML:

<clientincludes>

        <internaljscriptfile src=”/_static/sfa/sfautil.js” />

        <internaljscriptfile src=”/_static/sfa/opps/opps.js” />

        <internaljscriptfile src=”/_static/sfa/quotes/qoi_script.js” />

        <internaljscriptfile src=”$webresource:Opportunity_main_system_library.js” />

</clientincludes>

  1. Once finished, save the XML file.
  2. Next, drag the modified customizations.xml file back into the solution’s zip file and select the “Copy and Replace” option.
  3. Finally, import the solution back into Dynamics CRM and publish all customizations.

If you need troubleshooting support for Microsoft Dynamics CRM, RSM offers a full range of services throughout the United States from implementation and optimization to development and support. Our professionals are certified for Microsoft Dynamics with the Gold Customer Relationship Management (CRM) Competency in the Microsoft Partner Network. Contact our professionals for more information on our services at 855.437.7202 or [email protected]

By: Alesha Baerenwald – Microsoft Dynamics CRM partner in Minnesota

Tagged with →