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
Jakob BerntssonJakob Berntsson 

setTabLabel Lightning Component doesn't work with Actions

Hi,

In order to change what the tabs in Service Console in Lightning say for cases, I have implemented a Lightning Component + Apex classes after the instructions on the following page:

https://rajvakati.com/2018/11/13/lightning-console-set-tab-label-dynamically/

The only difference between his and my code is that I'm using the Subject field rather than the Origin field. Otherwise my "version" is identical.

While this mostly works, I've noticed that when one of the "Update a Record" actions in the case are used, the case label of the active tab sometimes incorrectly is set to another tab. This doesn't happen every time, but often enough to cause confusion among the support agents.

See example:User-added image

The action used for this test looks like this:
User-added image

How can I stop this happening? Is it because the doInit function isn't called often enough in the Component? What would I need to do to cover the scenario above as well?

Thanks in advance!

Best regards,
Jakob Berntsson
Jakob BerntssonJakob Berntsson
Correction: the behavior isn't tied to actions in particular, but rather record updates - I managed to reproduce the behavior by for example changing one of the fields in the record details.