Resolving the Error “XPathEvaluator’ is undefined”

Article sections

    Summary: How to resolve ‘XPathEvaluator is undefined’ script error in Microsoft Dynamics CRM 2011 after upgrading to Internet Explorer 11.
    Article Type: Information / Troubleshooting / Support
    Related Product(s): This article relates to the following products:

    • Microsoft Dynamics CRM 2011
    • Internet Explorer 11

    Following a recent customer upgrade from Internet Explorer 10 to Internet Explorer 11 we received reports that certain functionality within custom web resources in CRM stopped working. As they were on CRM 2011 Update Rollup 17 and running Windows 7 this was quite a surprise considering the two are now compatible.

    Upon investigating it turned out that any HTML resource that includes ‘ClientGlobalContext.js’ (used to get the context of the parent form) will throw the error “SCRIPT5009: ‘XPathEvaluator’ is undefined”.

    Fortunately, there is a relatively straightforward resolution to this and that is to add the following line to the <head> of your custom HTML documents that reference that particular JS file:

    <meta http-equiv=”X-UA-Compatible” content=”IE=10″ />

    The purpose of this line of the script is to force the browser to run the web resource in Internet Explorer 10 mode. The downside is that this functionality will be depreciated in Microsoft Edge, Microsoft’s soon to be released Internet Explorer replacement. As such it is highly recommended that customers are pre-warned not to upgrade to Microsoft Edge (which will come with Windows 10) until it has been fully tested and/or the custom web resources have been rewritten to not include this JS file.

    in MicrosoftMicrosoft Dynamics CRMSupportTroubleshooting
    Share This Post
    More To Explore

    Sign Up To Our Newsletter For Monthly Updates And News