function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jerun JoseJerun Jose 

Javascript button issue - Service Cloud Console

Hi,

 

We have a simple custom button that executes an on-click Javascript code.

 

var openSubtab = function openSubtab(result) {
	targetURL='/_ui/core/email/author/EmailAuthor?isdtp=vw';
	javascript:sforce.console.openSubtab(result.id,targetURL, true, 'Send Email');
};

var callOpenSubtab = function callOpenSubtab(result){
	sforce.console.getEnclosingPrimaryTabId(openSubtab);
};
sforce.console.getEnclosingPrimaryTabId(callOpenSubtab);

 This code works on normal execution. However, if I delete a related record for a case and then click this button, I get the error 'Registry is undefined'.

 

Anybody who can explain or help me understand this??