Wednesday, May 6, 2015

CRM 2015 - Script error on some forms

Did you receive this error?

Recently, I have been customizing some forms in CRM 2015 and I started getting this error. Mainly this was on some Case forms.
It is a Javascript type of error, which says:
There was an error with this field's customized event.
Field: window
Event: onload
Error: Unable to get property 'getValue' of undefined or null reference.

I removed all scripts and all business rules, but the error was still there.
Strange thing was, that the standard CASE form was working fine.
So I was investigating the differences between the forms. As you know, the case form contains some locked fields - such as Resolve by, First response by etc...You can recognize them in the form designer - they have red pad lock next to them.

I tried to open the forms which caused errors and add the "locked fields" to them. Then the error disappeared.
I did not want these fields on the form, so I have hidden them by unchecking "Visible by default" property.

I don't know why, but there seems to be some hardcoded script, which needs these fields on the form.

I hope this helps,


  1. Hi Michal,

    I have a similar problem,when I click on productid lookup. Hereare the detaisl of my issue. Pleas can you help resolving this issue.

  2. Dude, you saved my life. Thanks a lot.