locked
CrmEncodeDecode is undefined in IE 11 RRS feed

  • Question

  • Hi there,

    We have a CRM 2011 web resource that opens the edit form of an entity when clicked. We have JavaScript code that opens the form using Xrm.Utility.openEntityForm function. The problem is, when viewed in IE 11, we get a "Unable to get property 'CrmUrlEncode' of undefined or null reference" error. This is with IE set to use the Edge (Default) Document Mode. When we change it to use 10, it starts working.

    Is this a known issue with IE 11? Does anyone know any workaround for this?

    Thanks.

    Wednesday, April 2, 2014 2:59 PM

All replies

  • Hi doe-john

    We had the same problem in CRM2011 with IE11 in a web resource that reads data from Crm with SDK.JQuery.retrieveRecord() which is internally uses _context().getClientUrl().

    It looks like a timing issue that CrmEncodeDecode is not assigned yet.

    A workaround that seems to help is the following:

    if (typeof CrmEncodeDecode !== "object" && typeof CrmEncodeDecodeLibrary === "function" ) {
        CrmEncodeDecode = new CrmEncodeDecodeLibrary;
    }


    It assigns the library to CrmEncodeDecode that should already be assigned here, but only if not yet assigned.
    (This library is already assigned here when using another browser.)
    • Proposed as answer by ciao_matteo Tuesday, July 7, 2015 1:13 PM
    Thursday, March 26, 2015 1:13 PM