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
shaik baba 6shaik baba 6 

lightning: listview

Hi
for list view code in docs reference,

<lightning:listView aura:id="listViewAccounts" objectApiName="CustomObj__c" listName="My_Accounts" rows="5" showActionBar="false" enableInlineEdit="true" showRowLevelActions="false" />

I need some info regarding :listName="My_Accounts"

where does this listNames appear in the setup and how can I create custom ones to reuse in lightning?

Could you please explain in detail.

 
Vikash GoyalVikash Goyal
Hi Shaik,

Listviews are not available directly in the setup. 

:listName="My_Accounts" , this is developer name or api name for a list view which you can get in two ways :  

1. By querying on ListView :  you can filter results based on SobjectType.

    Select SobjectType, Id, DeveloperName From ListView

2. From List view of an object :  Go to any object tab ---> Select the list view --->  Click 'Edit' next to picklist ---> Unique Name field contains the API name for the list view.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks