Sample Code:
sforce.opencti.saveLog( {
value:{ entityApiName : "Task", Subject : "Testing", Priority : "Low" },
callback: function( result ) {
console.log( 'Result is', JSON.stringify( result ) );
console.log( 'Record Id is', result.returnValue.recordId );
sforce.opencti.screenPop( {
type : sforce.opencti.SCREENPOP_TYPE.SOBJECT,
params : { recordId : result.returnValue.recordId },
callback : function( result ) { console.log( 'Result is ' + JSON.stringify( result ) ) }
} );
}
} );
Output: