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.
1 Answer
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
- Your App needs to be "Lightning-enabled". You can see this in
Setup --> Manage Apps
. - 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.
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.
-
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.– HugoApr 5, 2021 at 17:14
-
-
lightning__Tab
andlightning__AppPage
. Not sure if theAppPage
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?