0

I'd like to enable split view support for my CustomTab but I don't find any information regarding how to do that. Salesforce seems to have been able to do that internally with High Velocity Sales but I haven't been able to retroengineer it.

enter image description here

6
  • if you go to a list view first, click on "split view", and then navigate back to your LWC tab - do you not see it as you want? Seems to work fine for my LWC tab. Or are you asking to display something custom in the split view portion? Apr 1, 2021 at 16:03
  • 1
    This is just the console view correct? I think you get that automatically if you enable the console. Apr 1, 2021 at 18:25
  • @KrisGoncalves I have tested it by (in this order) switching a standard list view (within a console app) to a split view, opening a record tab and then switching to my LWC tab (within the same console application) but it doesn't work. My LWC tab take the whole width. Do you have configured your LWC tab in a specific way to enable split view ?
    – Hugo
    Apr 2, 2021 at 8:34
  • Not by my intention - but maybe accidently. I have the targets in the metadata file as lightning__Tab and lightning__AppPage. Not sure if the AppPage is the one making a difference. Do you see a tiny sliver of whitespace with a right facing arrow on the leftmost side of your screen to click on to display the split view? Apr 2, 2021 at 11:25
  • I tried adding the lightning__AppPage target but it doesn't make a difference and I don't see any whitespace on the right. Do you have any custom setting in your CustomTab metadata maybe ? Do you mind sharing your CustomTab xml and a boilerplate of the lwc component you confiured ?
    – Hugo
    Apr 2, 2021 at 14:20

1 Answer 1

0

There is nothing to enable for this. A LWC tab, like any other tab in console, will co-exist with the out-of-box split view functionality for list views in Salesforce Lightning when it's opened as it's own tab.

Even though there's nothing to enable, there are considerations

  1. Your App needs to be "Lightning-enabled". You can see this in Setup --> Manage Apps.
  2. The tab (for LWC) needs to be opened as it's own tab in the console - it cannot just be selected in the navigational bar.

For point #2, the navigation bar selection is controlling what list-view/split view you're displaying. You can see this as you switch between Account, Lead, etc and the split view list view changes. As a LWC tab is not backed by any specific object/list view, you see nothing.

I've replicated this with a barebones LWC that is using the tab target and displayed a hello world message.

<template>
    HELLO WORLD
</template>
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>50.0</apiVersion>
    <description>TEST LWC</description>
    <isExposed>true</isExposed>
    <masterLabel>TEST LWC</masterLabel>
    <targets>
        <target>lightning__Tab</target>
    </targets>
</LightningComponentBundle>

When clicked on in the navigational bar, no split view is shown.

enter image description here

When opened as it's own tab (can use CTRL + click, or simply not add it to the navigational bar). It shows up as "Loading" as LWC currently does not have a workspace API to change the label/icon.

enter image description here

3
  • Thank you very much Kris for your detailed answer. However, my question must have been confusion as what I'm trying to do is to have my LWC component show as the sidebar itself, just as the account list view in your example. Salesforce seems to have done it internally for High Velocity Sales and I'd like to replicate it.
    – Hugo
    Apr 5, 2021 at 17:14
  • Is this the same question then as your other one? Apr 5, 2021 at 17:22
  • Yes indeed. I tried toi rephrase it to make it clearer
    – Hugo
    Apr 6, 2021 at 15:33

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