CRM 2011 - Form errors when opening non customised forms (object doesn't support property or method 'Form load')

You may experience the following error across a number of default entities after installing CRM 2011 on a new server. The errors occur despite having made NO customisations:

There was an error with this field's customized event

Field: window

Event: onload

Error: object doesn't support property or method 'Form load'

Within a fiddler trace, you may see the following:

401 https://<crmserver>/<myorg>/%7B634443390830000000%7D/WebResources/Ribbon_main_system_library.js

404 https://<crmserver>/<myorg>/%7B634443390830000000%7D/WebResources/Ribbon_main_system_library.js

When a Web Resource is requested from the CRM server, a URL is built dynamically. For that, CRM uses a component (that gets installed with CRM) called “Microsoft URL Rewrite 1.1 for IIS 7”, together with a rule that you can see inside the CRM Web site configurations under the URL Rewrite section called “WebResourcesRule”.

It has been seen that in some circumstances the Microsoft URL Rewrite Module does not get loaded properly and/or the rewrite rules are missing. The following can be done to check this:

1)

-Launch IIS Manager on the CRM server

-Select the CRM Website

-Double click Modules under IIS heading

-Verify RewriteModule is listed in the list here and is associated with the following DLL: %SystemRoot%\System32\Inetsrv\rewrite.dll

2)

-Launch IIS Manager on the CRM server

-Select the CRM Website

-Double click URL Rewrite under the IIS heading

-Verify that 3 rules exist here (ClientGlobalContectRule, WebResourcesRule, FederationMetadataRule)

If one or both of the above does not appear correct, then you should perform the following:

A) Make sure that Kernel-mode authentication is enabled:

-Launch IIS Manager on the CRM server

-Select the CRM Website

-Double click Authentication under the IIS heading.

-Select 'Windows Authentication'

-Click on Advanced Settings in the right hand Actions pane.

-Confirm 'Enable Kernel-mode authentication' is marked.

B) Repair or Reinstall the URL RewriteModule:

- The installation msi for the Microsoft URL RewriteModule can be found within the CRM server installation media under a folder called UrlRewriteModule. The file is called rewrite_1.1_amd64_rtw.

- Reboot the CRM Server after reinstalling the module.

When the module is correctly installed, the CRM website web.config file should be automatically updated. To verify this open the CRM website web.config file and make sure the following element is present under <rewrite>.

</security>

<rewrite>

<rules>

<rule name="ClientGlobalContextRule" stopProcessing="true">

<match url="/?([0-9a-zA-Z][^/]*)?/?((?:%7b|\{)[^/]*(?:%7d|\}))?/?(WebResources|Handlers)/ClientGlobalContext.js.aspx" />

<action type="Rewrite" url="/{R:1}/_Common/ClientGlobalContext.js.aspx" />

</rule>

<rule name="WebResourcesRule" stopProcessing="true">

<match url="/?([0-9a-zA-Z][^/]*)?/?((?:%7b|\{)[^/]*(?:%7d|\}))?/?webresources/([^\\?]+)" />

<action type="Rewrite" url="/{R:1}/Handlers/WebResource.ashx?name={R:3}" />

</rule>

<rule name="FederationMetadataRule" stopProcessing="true">

<match url="FederationMetadata/2007-06/FederationMetadata.xml" />

<action type="Rewrite" url="/Handlers/FederationMetadata.ashx" />

</rule>

</rules>

</rewrite>

</system.webServer>

 

Microsoft URL Rewrite Module 1.1 for IIS 7 (x64) can be downloaded from below:

https://www.microsoft.com/download/en/details.aspx?displaylang=en&id=16784 

 

Best Regards

Dynamics CRM Team

Comments

  • Anonymous
    September 20, 2011
    Thanks, lifesaver, this did the trick for me.  We had a perfectly working CRM2011 install that developed this problem with onload on every form, perhaps related to a CRM Rollup 3 install.  The rewrite rules were gone.  Re-install of module didn't work, I had to manually enter the tags back into the web.config, which worked ok.

  • Anonymous
    March 10, 2014
    Thanks, this worked for me: A) Make sure that Kernel-mode authentication is enabled: -Launch IIS Manager on the CRM server -Select the CRM Website -Double click Authentication under the IIS heading. -Select 'Windows Authentication' -Click on Advanced Settings in the right hand Actions pane. -Confirm 'Enable Kernel-mode authentication' is marked.

  • Anonymous
    March 28, 2014
    this not fix my issue :( is there any way to find out what cause this error ?

  • Anonymous
    May 20, 2014
    Re-install of module didn't work, I had to manually enter the tags  under  <system.webServer> in the web.config, which worked ok. thanks...:-)

  • Anonymous
    January 19, 2015
    You've saved my bacon today! Thank you.