[SalesForce] In IE11 lightning component is not loading. Error(Component class instance initialization error [Expected identifier, string or number])

In IE, a lightning component is not loading. Getting error like "Component class instance initialization error [Expected identifier, string or number]"

I checked all attributes and not found issue root cause.

In Chrome, the component is working fine.

var objName = object Name
var createRecordEvent = $A.get("e.force:createRecord");
var fieldAPIName = cmp.get('v.mainLookupFieldName');
var objectFieldValues = {[fieldAPIName] : cmp.get('v.recordId')};
createRecordEvent.setParams({
                    "entityApiName": objName,
                    "defaultFieldValues" : objectFieldValues
                });

createRecordEvent.fire(); 

IN IE11 below code is working.

var createRecordEvent = $A.get("e.force:createRecord");
var fieldAPIName = cmp.get('v.mainLookupFieldName');
createRecordEvent.setParams({
                    "entityApiName": objName
});
createRecordEvent.fire(); 

the problem is in the default value

Best Answer

See here for browser support for lightning experience.

You must 'opt in' for it to work today in IE11, but know that that will save you only until end of year 2020. Here is the note for your quick reference:

IMPORTANT Support for Internet Explorer 11 to access Lightning Experience is retiring beginning in Summer ’16.

You can continue to use IE11 to access Lightning Experience until December 16, 2017.

If you opt in to Extended Support for IE11, you can continue to use IE11 to access Lightning Experience and Communities until December 31, 2020.

IE11 has significant performance issues in Lightning Experience.

It is strongly recommended that you do not use Internet Explorer 11 with Community Builder.

This change doesn’t impact Salesforce Classic.

How to opt in?

The opt-in option will become available only when your org updates to Winter '18 version. Once that happens, go to Setup, enter "Session Settings" in the Quick Find box, then select Session Settings. Scroll to the section titled "Extended use of IE11 with Lightning Experience" and agree to terms.

See this for more info.