+ Start a Discussion
KyoKyo 

CloseTab Service Cloud Console in Button

Button Code Error Cannot Call Method 'closeTeb' of undefined

 

{!REQUIRESCRIPT("/soap/ajax/8.0/connection.js")}
{!REQUIRESCRIPT("/support/console/20.0/integration.js")}
var Relationship__c = new sforce.SObject("Relationship__c"); 
Relationship__c.id = "{!Relationship__c.Id}"; 
Relationship__c.Mark_for_Delete__c = true;
var result = sforce.connection.update([Relationship__c]);
if (result[0].getBoolean("success")) 
{ 
// Refresh window 
window.location.reload(); 
window.open('', '_self', '');
sforce.console.closeTab();

} 
else 
{ 
alert("Error saving event"); 
}

 Thank you so much.