0

I am doing a project in Salesforce Softphone using Open CTI.

I am having issue updating Activity History after I save the log using OpenCTI saveLog() function.

Here is my code:

var saveParams = 'Subject=' + moment(new Date()).format('lll');
saveParams += '&WhoID='+ContactID;
saveParams += '&CallDisposition=' + selectedDispo;     
saveParams += '&CallType=' + calledType;
saveParams += '&CreatedDate=' + new Date();
saveParams += '&CallObject=' + callNumber;
saveParams += '&Description=' + $j('[id$=inputTextLog]').val();            
sforce.interaction.saveLog('Task', saveParams, saveLogCallback);

function saveLogCallback(response){
        if (response.result){
            //This updates Open Activity. I want to update Activity History
            sforce.interaction.refreshRelatedList('Activity',checkRefreshResult);                
            }
        else{
            console.log('>>> SoftPhone.saveLogCallback: Could not save object!');
            }
        }


    function checkRefreshResult(response){
        if (response.result){
            console.log('>>> SoftPhone.checkRefreshResult: The related list is refreshed!');
            }
        else{
            console.log('>>> SoftPhone.checkRefreshResult: Cannot refresh the related list', response);
            }
        }

1 Answer 1

0

Call the refreshRelatedList with the "History" input parameter to update Activity History.

sforce.interaction.refreshRelatedList('History', checkRefreshResult);

You must log in to answer this question.

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