Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

A JavaScript error occurs in the Microsoft Dynamics CRM 2011 List Component: "Sys.InvalidOperationException: A control is already associated with the element.”


View products that this article applies to.

Introduction

On a Microsoft Dynamics CRM 2011 deployment integrated with Office SharePoint 2010 or Office SharePoint 2013, a user could get a JavaScript error the second time the user wants to open an Office document file from the same CRM grid.

While the first time the file opens as expected, the second time, the user needs to go back to the CRM web page. The CRM grid will start to refresh, raising the following JavaScript Exception: "Sys.InvalidOperationException: A control is already associated with the element”.


This behavior occurs if SharePoint has debug mode enabled.

To avoid this issue, SharePoint needs debug mode disabled.



Resolution


As a resolution, SharePoint debug mode need to be disabled:

1. Login to SharePoint server with administrative Privileges

2. Search for the file web.config under the application folder (e.g. "C:\inetpub\wwwroot\wss\VirtualDirectories\80")

3. Make a copy of the file

4. Open it with notepad

5. Search for: debug="true"

6. Update the debug value to be false: debug="false"

7. Save the file


Note that as soon as you make the change, it will then be automatically loaded by the IIS Server hosting the SharePoint application.




↑ Back to the top


Keywords: kbmbsmigrate, kbmbspartner, kbsurveynew, kbcrmdocs, kb

↑ Back to the top

Article Info
Article ID : 2872156
Revision : 1
Created on : 1/7/2017
Published on : 11/5/2013
Exists online : False
Views : 238