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:
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.