You need to sign in to do that
Don't have an account?
Srcup not defined on javascript button opening Visualforce page
Hi,
I have a on click javascript button on the case pagelayout which opens a visual force page and was working fine but suddenly user started getting error Url does not exists. but when I login as user and click on that button I see "srcUp is not defined" error.
Here is the simple javascript on that button.
srcUp('apex/CaseVFPage_v1?id={!Case.Id}');,
I have a on click javascript button on the case pagelayout which opens a visual force page and was working fine but suddenly user started getting error Url does not exists. but when I login as user and click on that button I see "srcUp is not defined" error.
Here is the simple javascript on that button.
srcUp('apex/CaseVFPage_v1?id={!Case.Id}');,
{!REQUIRESCRIPT("/support/console/30.0/integration.js")}
if(typeof(srcUp) == 'function') //Checks that it is in console
{
var openSubtab = function(result){
sforce.console.openSubtab(result.id,'/apex/YourVFPageName?caseID={!Case.Id}&inConsole=true', true, 'Subtab Name', null);
};
sforce.console.getEnclosingPrimaryTabId(openSubtab);
}
else{
window.parent.location.href=('/apex/YourVFPageName?caseID={!Case.Id}&inConsole=false')
}
SrcUp can be used to open subtabs in the service cloud console.
This Button code will handle the opening of the VF page in console and outside console very effectively.
I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.
Thanks.
Thanks for your inputs on using this button on console. I will use this approach going forward.
This button has been working from years and suddenly one of our user started facing the error when he clicked on this button in chrom browser, and I suggested to try in some other browser which worked. He tried in firefox and also tried in chrom incognito both worked. No other user reported this, so my conclusion was that some issue in user chrome browser or he installed some extension which is creating this conflict.