Summary:

A script error may occur when adding Custom Content scripts to the Top Content screens for custom entities.



Symptoms:

On adding some basic JavaScript to the Top Content area for a custom entity, a range of errors may be displayed. These can include the following:

Unterminated string constant

Uncaught SyntaxError: Unexpected token ILLEGAL

If JavaScript error reporting is disabled in the browser, then error messages will be reported in the browser's developer console.



Cause:

Sage CRM uses a JavaScript function that takes the HTML for the top content area as a parameter, and attempts to set it. The presence of the <script> tag in the HTML string causes the browser to try and parse the JavaScript. This causes an error.



Resolution:

This issue will be resolved in Sage CRM 7.3d, scheduled for release at the end of November 2015.

Alternatively, the issue can be worked around by including the desired JAvaScript in a custom JS file in \CRM\WWWRoot\js\custom\.