Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement