In Omnistudio, Create New ‘NavigateToListView’ Flexcard. Source Type is none.

Add Title using Text properties.

Now create New Apex class ‘RetrieveData‘ and Add this code.

public class RetrieveData {
@Auraenabled
public static List<sobject> retrieveSobjectList(String query){
return database.query(query);
}
}
Now, create ‘NavigateToDeveloperName’ Lightning Web Component. And Add below code.

navigateToDeveloperName.html
<template>
<div class="btn-container navigatelist" onclick={handleNext}>
{listOfTitle}
</div>
</template>
navigateToDeveloperName.js
import { LightningElement, api } from 'lwc';
import { OmniscriptBaseMixin } from 'omnistudio/omniscriptBaseMixin';
import { NavigationMixin } from 'lightning/navigation';
import { getNamespaceDotNotation } from 'omnistudio/omniscriptInternalUtils';
import { OmniscriptActionCommonUtil } from 'omnistudio/omniscriptActionUtils';
import retrieveSobjectRecords from '@salesforce/apex/RetrieveData.retrieveSobjectList';
import template from './navigateToDeveloperName.html';
export default class NavigateToDeveloperName extends OmniscriptBaseMixin(NavigationMixin(LightningElement)) {
_ns = getNamespaceDotNotation();
_actionUtilClass;
@api listDeveloperName;
@api listViewId;
@api listOfTitle;
@api objectApiName;
connectedCallback() {
this._actionUtilClass = new OmniscriptActionCommonUtil();
}
render() {
return template;
}
handleNext() {
console.log('btnclick');
if(this.listViewId){
this.handleListViewNavigation(this.listViewId);
}
else{
retrieveSobjectRecords({ query : 'SELECT Id, Name, DeveloperName, SobjectType FROM ListView WHERE DeveloperName = \'' + this.listDeveloperName + '\' AND SobjectType =\'' + this.objectApiName + '\'' })
.then(result => {
if(result && result.length > 0){
this.handleListViewNavigation(result[0].Id);
}
else{
this.handleListViewNavigation('Recent');
}
})
.catch(error => {
console.error(error);
})
}
}
handleListViewNavigation(filterName) {
// Navigate to the Accounts object's Recent list view.
this[NavigationMixin.Navigate]({
type: 'standard__objectPage',
attributes: {
objectApiName: this.objectApiName,
actionName: 'list'
},
state: {
filterName: filterName
}
});
}
}
navigateToDeveloperName.css
/*navigateToDeveloperName.css*/
.btn-container {
display: flex;
justify-content: center;
}
.navigatelist {
cursor: pointer;
font-size: 20px;
}
navigateToDeveloperName.xml
<?xml version="1.0"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>57.0</apiVersion>
<isExposed>true</isExposed>
<runtimeNamespace>omnistudio</runtimeNamespace>
<targets>
<target>lightningCommunity__Page</target>
<target>lightningCommunity__Default</target>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>
Now, Create New child ‘ListOfAllAccount‘ Flexcard with no source

In Child flexcard, Add custom Lwc and Pass 3 Attribute. And Activate this Flexcard.

Now Add this ChildFlexcard to parent ‘NavigateToListView‘ Flexcard using child card properties.

Now add parent Flexcard (NavigateToListView) in Home page.

here, when you click on this second Title All Account. you can redirect to All Account Listview page.


Thank you!! I hope this information is helpful for you.