The purpose of this page is to rename a case tab from the standard Case Number label to the Case Subject when a new record is opened in Service Cloud. I added the page to our Developer Support Lightning Page layout, and the functionality is working beautifully for most of our developer support cases. However, for a handful of records, the tab is not being renamed to the Case Subject and is just staying as the Case Number. I've verified that the VF page is added to the layout for these records and that there aren't any filters on the VF page - it should always run for all records with the Developer Support record type. Can anyone think of a reason why the functionality wouldn't be triggering on certain records within the correct record type?", "answerCount": 2, "upvoteCount": 0, "datePublished": "2020-09-23T19:00:59.000Z", "author": { "@type": "Person", "name": "Meg Kitto", "url": "https://trailblazers.salesforce.com/profileView?u=0053A00000FVfzoQAD", "affiliation": { "@type": "Organization", "name": "Auth0" } }, "suggestedAnswer": [ { "@type": "Answer", "text": "Hi Swetha, Thanks for your response! Upon inspection, I see the following error on records where the renaming function isn't working:  Uncaught SyntaxError: missing ) after argument list There is no commonality between the subject lines of the cases - two of them don't even have special characters.", "upvoteCount": 0, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T42UjSAJ", "datePublished": "2020-09-28T21:07:04.000Z", "author": { "@type": "Person", "name": "Meg Kitto", "url": "https://trailblazers.salesforce.com/profileView?u=0053A00000FVfzoQAD", "affiliation": { "@type": "Organization", "name": "Auth0" } } } ] } }
Skip to main content

I've created a custom VF page with help from the community. Code snippet below:

<apex:page standardController="Case" title="">

<apex:includeScript value="/support/console/45.0/integration.js"/>

<script type="text/javascript">

function testSetTabTitle() {

//Set the current tab's title

sforce.console.setTabTitle('My New Title');

}

function testing() {

//Set the current tab's title

sforce.console.setTabTitle('{!Case.Subject}');

}

var pageLoad = window.onload;

window.onload = function() {

if (pageLoad) {

pageLoad();

}

testing();

console.log('done')

}

</script>

<style>

body{

background: transparent;

}

</style>

</apex:page>

The purpose of this page is to rename a case tab from the standard Case Number label to the Case Subject when a new record is opened in Service Cloud.

I added the page to our Developer Support Lightning Page layout, and the functionality is working beautifully for most of our developer support cases. However, for a handful of records, the tab is not being renamed to the Case Subject and is just staying as the Case Number. I've verified that the VF page is added to the layout for these records and that there aren't any filters on the VF page - it should always run for all records with the Developer Support record type.

Can anyone think of a reason why the functionality wouldn't be triggering on certain records within the correct record type?

 
2 answers
  1. Sep 28, 2020, 9:07 PM
    Hi Swetha,

    Thanks for your response! Upon inspection, I see the following error on records where the renaming function isn't working: 

    Uncaught SyntaxError: missing ) after argument list

    There is no commonality between the subject lines of the cases - two of them don't even have special characters.

0/9000