Script Error when Viewing SharePoint Documents within the Microsoft CRM Outlook Client

While developing a Microsoft Dynamics CRM solution integrated with SharePoint for one of our clients, I would get the following JavaScript error when accessing documents from the Outlook Client:

“An error has occurred in the script on this page.”

“Sys.InvalidOperationException: A control is already associated with the element.”

Sys.InvalidOperationException A control is already associated with the element

After a bit of research I identified the root of the problem.

The error is caused by the debug mode in SharePoint (which I had turned on for development purposes).

To turn off debug mode in the SharePoint site’s web.config, navigate to:

C:inetpubwwwrootwssVirtualDirectoriesyour port number


<compilation batch="true" debug="true">


<compilation batch="true" debug="false">

Problem solved!

If I could be of further help to you, please contact FMT at (760) 930-6400.

Written by:
Josh Anderson
Senior CRM & SharePoint Consultant

Posted by:

 FMT Consultants
Privacy Policy
Your Privacy Choices

Contact Us


Newsletter Sign-up

menu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram