Is there anyway to change the Case tab title to the SUBJECT instead of the CASE NUMBER in Lightning(Service Cloud)?

Please see below snapshot. Using Lightning Service Cloud

Your help will be highly appreciated.

Thanks in advance!

2 Answers 2


You can create a utility bar component and use the console toolkit method setTabLabel in conjunction with an event handler for the tabCreated event to set the label of a tab as it's opened. There's a sample for how to do this in the documentation here. You'd also need to find a way to retrieve the case subject, likely through an apex controller.

  • Yes, already i tried this before, but i can't save this lightning component due to error Failed to save undefined: No COMPONENT named workspaceAPIAccess found: Source line 2: <force:workspaceAPIAccess aura:id="workspace" /> Commented Aug 2, 2017 at 4:33
  • I referring this example setTabLabel() for Lightning Experience Commented Aug 2, 2017 at 4:42

There is a method named sforce.console.setTabTitle. If you use a Visualforce Page, you can get this to work:

<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
    var pageLoad = window.onload;
    window.onload = function() {
        if (pageLoad) {
        background: transparent;

changed tab title

  • Hi Mark, Please note that this post is what we call a "code dump answer" where you only provide code and do not offer any additional explanation of how it solves the issue. Your post would be improved, for example, if you explain what the key functionality is, and where it is documented. Also, including a screenshot of your code is not necessary, the text version is sufficient.
    – Adrian Larson
    Commented Apr 16, 2019 at 2:44
  • This solution worked perfectly for me. Thanks @MarkItDone !! Commented Jul 14, 2020 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .