We are trying to prepopulate the whoid and whatid while creating new Task. We accomplished this using Javascript button in Classic , and as we are moving to Lightning , we tried creating a Lightning component using the following code
var createRecordEvent = $A.get('e.force:createRecord');
if ( createRecordEvent ) {
createRecordEvent.setParams({
'entityApiName': 'Task',
'defaultFieldValues': {
'Description' : 'Nice',
'WhatId' : accountid,
'whoId' : contactid
}
});
createRecordEvent.fire();
The whatid (Related To) does get prepopulated .However the whoId continues to be blank.
Any suggestions?
5 件のコメント
@Jeremiah Dohn Woohoo that worked, Thanks! @Charles Thompson Yes sneaky case-sensitivity. Good lesson to be alert :)