Skip to main content

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 件のコメント
0/9000