Home > Dynamics CRM, Internet Explorer > Microsoft Dynamics CRM 2011–”Microsoft Dynamics CRM has encountered an error” – Lookup Error

Microsoft Dynamics CRM 2011–”Microsoft Dynamics CRM has encountered an error” – Lookup Error

Posting the resolution to an issue found during UAT of a CRM 2011 system. The issue arose when the tester clicked save and close on a CRM 2011 record. The error message presented to the tester is shown below.

Microsoft Encountered an Error

To view the error details, the user can click View the data that will be sent to Microsoft link. The error information relating to this post will look similar to the following screenshot.

CRM Script Error

The error message is:

<Message>‘this.$E_2.contentWindow.document.body’ is null or not an object</Message>

Also notice that is commonly appears on line 6.

Issue

When you enter data in a CRM 2011 lookup field that has the field formatting option of most recently used items functionality enabled, you receive a script error when clicking Save and Close on the CRM form.

Resolution

1. Go to Settings > Customization, and then click Customize the System.
2. Open your CRM 2011 entity in question, and then click Forms.
3. Double-click the form so the form customization window opens.

What you will need to do now for each custom lookup fields is the following:
4. Double-click to open.
5. Under Field Behaviour section in the Display tab, deselect or un tick the option Disable most recently used items for this field.

DisableOption

 

Now save and publish your customisation. You should now notice the issue disappear.

Greg Olsen
Yellow Duck Guy

Advertisements
  1. Terry
    May 30, 2012 at 11:31 pm

    Thanks, this was really annonying me / users. In our case the lookup was used muliple times on a form.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: