0

I have called flow in the URL button. When I click on the button, a new tab is opened and flow is initiated but the tab name is displayed as Task. Is there any way to change the tab name in Service Console? enter image description here

0

No, You cannot.

Workaround:

You can use the URL button to load an Aura component with lightning:isUrlAddressable interface. You should give url like /lightning/cmp/c__MyComponent and then in component, on init, invoke flow and also change the label using workspaceApi. Below is sample code:

COMPONENT:

<aura:component implements="lightning:isUrlAddressable"
                access="GLOBAL">

    <lightning:workspaceAPI aura:id="workspace" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <lightning:flow aura:id="flowData"/>

</aura:component>

CONTROLLER:

doInit: function (component, event, helper) {
    component.find("flowData").startFlow("Quick_Account"); // API name of flow

    var workspaceAPI = component.find("workspace");
    workspaceAPI.isConsoleNavigation().then(function(isCon) {
        console.log('isCon => ', JSON.stringify(isCon));
        workspaceAPI.getFocusedTabInfo().then(function(response) {
            var focusedTabId = response.tabId;
            workspaceAPI.setTabLabel({
                tabId: focusedTabId,
                label: "Focused Tab"
            });
            workspaceAPI.setTabIcon({
                tabId: focusedTabId, 
                icon: "utility:account",
                iconAlt: "New Account"
            });
        })
        .catch(function(error) {
            console.log(error);
        });
    });
},

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.