You need to sign in to do that
Don't have an account?
Service console integration toolkit
Hello,
I have a custom button Accept on the case object that updates the owner of the case to the current owner.
However, in the service cloud console, the part of code used to refresh the primary tab of the console generates the error 'Undefined Registry'.
{!REQUIRESCRIPT("/soap/ajax/27.0/connection.js")}
{!REQUIRESCRIPT("/support/console/27.0/integration.js")}
var refreshSuccess = function refreshSuccess(result) {
//Report whether refreshing the primary tab was successful
if (result.success ==false)
{
alert(result.errors.message);
}
};
var SubNext = function SubNext(result) {
var tabId = result.id;
sforce.console.refreshPrimaryTabById(tabId,true,refreshSuccess);
//alert('Reshed');
}
var caseObj = new sforce.SObject("Case");
caseObj.Id = '{!Case.Id}';
caseObj.OwnerId = '{!$User.Id}';
var result = sforce.connection.update([caseObj]);
if (result[0].success=='false') {
alert(result[0].errors.message);
}
else{
if(sforce.console.isInConsole()){
sforce.console.getEnclosingPrimaryTabId(SubNext);
}
else{
window.location = "/"+'{!Case.Id}';
}
}
Can you please help?
If the case is created via email to case and the button used, it works fine. However, if the case is created directly via the console, this error is obtained.
Regards,