I have a requirement where I need to set the defaultFieldValues
dynamically (both field name & value). How can I achieve that?
var createRecordEvent = $A.get('e.force:createRecord');
if ( createRecordEvent ) {
createRecordEvent.setParams({
'entityApiName': 'Account',
'defaultFieldValues': {
'Name' : 'John',
'XYZ__C' : '123',
}
});
createRecordEvent.fire();
}
JSON.stringify(your value of Map<String,String)
?