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
Hey SandboxHey Sandbox 

Change the Case tabs to the Subject instead of the Case Number in Lightning(Service Cloud)

Is there anyway to change the Case tab title to the SUBJECT instead of the CASE NUMBER?

Please see below snapshot. 
User-added image

Your help will be highly appreciated.

Thanks in advance!
Prashant Raiyani
David HalesDavid Hales
Hi Prashant,
Try explicitly setting the title of the tab in your VF page such as:
<apex:page standardController="Case" standardStyleSheets="true" showHeader="false" sidebar="false">
     <apex:includeScript value="/support/console/22.0/integration.js"/>
     <script type="text/javascript">
            function defaultTabTitle() {
                //Set the current tab's title
                sforce.console.setTabTitle('Case: {!case.CaseNumber}');
          var pageLoad = window.onload;
          window.onload = function() {
                 if (pageLoad) {
     <apex:detail subject="{!case.Id}" relatedList="false" title="false" inlineedit="true"/>

If the above suggestion worked, let us know by marking the answer as "Best Answer" right under the comment which will help the rest of the community should they have a similar issue in the future. 

Thanks & Regards 
David Hales(1044)
Kloudrac Softwares Pvt. Ltd.
Pramodh KumarPramodh Kumar
This feature is not available yet in the lightning. I can't customize the lightning console as much as classic console. As it is still beta stage, I think in the coming release we may get any updates.

If you want to customize any custom anything please go through the workspaceAPI

Hey SandboxHey Sandbox
Hi Pramodh Kumar,

Yes, already tried this before week, but i can't save this lightning component due to Error:
Failed to save undefined: No COMPONENT named workspaceAPIAccess found: Source
ERROR on Componenet Save
On component line 2:
<force:workspaceAPIAccess aura:id="workspace" />
 I referring this example setTabLabel() for Lightning Experience (

Please reply, If you have any solution for above error.

Prashant Raiyani
NagendraNagendra (Salesforce Developers) 
Hi Prashanth,

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.

Ido Greenbaum 10Ido Greenbaum 10

If you are able to acheive this, please kindly share here. 

Thank you. 

Pramodh KumarPramodh Kumar

workspaceAPI is available only API version 40. If your component is using below 40 then it wont able to save the component. 

Here is my code
<aura:component implements="force:hasRecordId,flexipage:availableForAllPageTypes">
    <aura:attribute name="recordId" type="Id"/> 
    <force:workspaceAPIAccess aura:id="workspace" />
    <ui:button press="{!c.doInit}" label="Update"></ui:button>
    doInit : function(component) {        	
        var workspaceAPI = component.find("workspace");         
            callback : function(error, response){            
                var focusedTabId = response.tabId;                
                    url : '#/sObject/005R0000000INjPIAW/view',
                    focus: true                    

Hey SandboxHey Sandbox
@Pramodh Kumar

Still No Success! Using same API version 40.
Reused same code from above.
Component Meta XML
<AuraDefinitionBundle xmlns="">
    <description>Lightning Console JavaScript API</description>
API Verion 40 from Bundle Version Settings.

API 40

Same error occured.

Prashant Raiyani
Andrea CatalanoAndrea Catalano
   the "No COMPONENT named workspaceAPIAccess found" error shoult be related to the Javascript API that, at the moment I'm writing (Summer '17), is in Pilot and you neet it enabled on your org (by support request if apply).
Hey SandboxHey Sandbox
Hi Andrea,

Yes, I've followed the same for my DEV Org.
Sandobx & Production accounts require a Pilot agreement to use the JS APIs in Lightning.
Note that the syntax will be changing in Winter '18. Prerelease program should be live in a few days, and they'll have updated syntax guide live in about a week as well.

Prashant Raiyani
sumedha govindaraya 9sumedha govindaraya 9
Hi Prashant,
How did you resolve the issue? I have to achieve the same requirement and any help is appreciated.

Erik Hamelink 2Erik Hamelink 2
User-added image
User-added image
Add this to all pages where you want the label to be any field on the current object.

this is the code:
	<aura:handler name="init" action="{!c.doInit}" value="{!this}" />
	<aura:attribute name="recordId" type="Id" />
	<aura:attribute name="fieldName" type="String" default="Name" />
	<aura:attribute name="record" type="Object" />
	<aura:attribute name="simpleRecord" type="Object" />
	<aura:attribute name="recordError" type="String" />


	<lightning:workspaceAPI aura:id="workspace" />
	doInit: function (cmp) {
		var RecordId = cmp.get("v.recordId");
		var field = cmp.get("v.fieldName");
		cmp.find("recordLoader").set("v.recordId", RecordId);
		cmp.find("recordLoader").set("v.fields", [field]);

	handleRecordUpdated: function (cmp) {
		let field = cmp.get("v.fieldName");
		let labelValue = cmp.get("v.simpleRecord." + field);
		var workspaceAPI = cmp.find("workspace");

		if (labelValue) {
				.then(function (response) {
					var focusedTabId = response.tabId;
						tabId: focusedTabId,
						label: labelValue
				.catch(function (error) {
		description="The name of the field to use for the label"

Good luck!

If the above suggestion worked, let us know by marking the answer as "Best Answer" right under the comment which will help the rest of the community should they have a similar issue in the future. 
Suraj MallaSuraj Malla
Thanks Erik Hamelink 2. It works well.
David KreitzerDavid Kreitzer
Erik Hamelink 2, thanks for this!  I was able to create the component, but when I add it to a page the option to set the field does not appear.  Any help would be appreciated, thank you! 

User-added image