0

I want to use screenPop method from open CTI to create new object. I'm using code as below.

 sforce.opencti.screenPop({
        type: sforce.opencti.SCREENPOP_TYPE.NEW_RECORD_MODAL, //Review the arguments section.
        params:  { entityName: 'Lead' },
        callback: function(args) {
            console.log(args);
        } 
    } );

but I want to prepopulate some fields like phone. Does anyone know what should I put in params or that is not possible at all... ?

2 Answers 2

0

Please consider the following code for Lightning Experience in Open CTI.

var lname ='Testname';
var phno = '123456789';
sforce.opencti.screenPop({
                          type: sforce.opencti.SCREENPOP_TYPE.NEW_RECORD_MODAL,
                                        params: {
                                            entityName: 'Contact',
                                            defaultFieldValues:{LastName:lname,Phone:phno}
                                        }

                                    });

It shows a popup window to create a new Contact record with given default values. (For Lightning Experience)

Ajay Krishna R

1
  • I think that at that time it was some issue with framework as it had started working after some time...
    – psobczak
    Commented Apr 23, 2019 at 7:29
0

enter image description here

For the debugged code, seems that is not possible...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .