List View (Beta)

lightning:listView

Displays a List View of the specified object. This component requires API 42.0 and later.

For Aura components only. For LWC development, use lightning/uiListsApi.

For Use In

Lightning Experience, Experience Builder Sites, Salesforce Mobile App

A lightning:listView component represents a list view of records that you own or have read or write access to, and records shared with you. They also include records owned by or shared with users in roles below you in the role hierarchy. You can see only the fields that are visible according to your page layout and field-level security settings.

To create a list view, specify which object to render with the objectApiName attribute and which list view to use with the listName attribute. The list view doesn't require additional Apex controllers or Lightning Data Service to display record data.

This example displays a list view of Accounts with five rows. Each time "Load More" is clicked, five more rows are loaded and appended.

The action bar isn't shown at the top of the component and the per-row actions are also hidden. However, the search bar, mass inline editing and inline editing of individual cells are available.

Links outside of Lightning Experience and Experience Builder sites appear as hyperlinks but don't navigate to the link target. This is a known limitation that will be addressed in a future release.

lightning:listView supports the following features:

  • Inline editing
  • Mass inline editing for single record types
  • Resizing and sorting of columns
  • Search
  • Text wrapping
  • Loading of additional rows

You can configure inline editing. Other features aren't configurable. Additionally, the following features are not supported via the lightning:listView UI.

  • Creating or deleting of list views
  • Modifying of the list view filter
  • Switching to other list views

If an invalid objectApiName or listName value is used, an error displays.

To retrieve list view names and object API names available in your org for the listName attribute, run this SOQL query.

The following objects are supported:

  • Account
  • Asset
  • Campaign
  • Case
  • Contact
  • ContentVersion
  • Contract
  • Entitlement
  • EntityMilestone
  • EnvironmentHubMember
  • Lead
  • MaintenancePlan
  • OperatingHours
  • Opportunity
  • Order
  • Product2
  • Pricebook2
  • Quote
  • ResourcePreference
  • ReturnOrder
  • ServiceAppointment
  • ServiceResource
  • ServiceTerritory
  • ServiceTerritoryMember
  • ServiceResourceSkill
  • ServiceCrew
  • ServiceCrewMember
  • ServiceContract
  • Shipment
  • SkillRequirement
  • SocialPost
  • Task
  • Tenant
  • TimeSheet
  • TimeSheetEntry
  • WorkType
  • WorkOrder
  • WorkOrderLineItem

Inline edit, row level actions, and the action bar are supported in Lightning Experience, the Salesforce app, and Experience Builder sites only.

If attempting to use these features outside of this context, they are automatically disabled and a warning displays.

On a desktop, this component renders a full list view. On all other form factors, such as a tablet or mobile devices, the component renders a mobile-friendly alternative.