Reputation: 45
CRM 2011 html web resource is failing in IE11 with the error "Unable to get property 'CrmUrlEncode' of undefined or null reference". The same web resource works perfectly in IE 10 and less.
The above error is triggering from the method context().getClientUrl() of XrmServiceToolkit (the codeplex library version 2.1). The actual method I am using is XrmServiceToolkit.Rest.Retrieve to get a CRM record.
Initially I thought it's compatibility issue as we were on Rollup 15 and one of Microsoft article specified that CRM IE 11 compatibility is released with Rollup 17. Now We have upgraded our environment to Rollup 18 but still the same issue.
Upvotes: 2
Views: 1280
Reputation: 7918
This issue is caused by the built-in script component ClientGlobalContext.js.aspx
, which is not compatible with Internet Explorer 11. In many cases we need it in our custom HTML web resources to get a proper integration with CRM, so we cannot do without it.
Luckily the solution is easy: add the following metatag to your HTML web resource header:
<meta content="IE=10,chrome=1" http-equiv="X-UA-Compatible">
This instructs IE to behave as if it were version 10.
Upvotes: 2