ListView defines an object-specific filtered list of records and the columns displayed for those records. List views belong to the listViews collection of a CustomObject component, which can represent a standard object or a custom object.
View visibility, record-selection scope, filter criteria, and displayed columns are separate settings. In particular, sharedTo controls access to the view, not record-sharing rules. List views marked "Visible only to me" are user-specific and inaccessible through Metadata API, so a metadata inventory does not include every user's personal views.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
Required metadata identity for creating, updating, and deleting the view. It is distinct from label, the displayed view name. |
columns |
The displayed field identifiers. Custom fields use names relative to the object, such as MyCustomField__c. List-view identifiers do not always match field API names. |
filterScope |
Required record-selection context. Allowed values are Everything, Mine, MineAndMyGroups, AssignedToMe, Queue, Delegated, MyTerritory, MyTeamTerritory, Team, SalesTeam, and ScopingRule. Several values have object or feature restrictions. |
filters |
Individual filter conditions. Each entry uses field for the field identifier, operation for the comparison, and value for the comparison value. Operations are equals, notEqual, lessThan, greaterThan, lessOrEqual, greaterOrEqual, contains, notContain, startsWith, includes, excludes, and within. The within operation is restricted to DISTANCE criteria. |
booleanFilter |
Combines numbered filter conditions with AND, OR, and parentheses. The numbers refer to the positions of entries in filters. |
division |
Requires matching records to belong to the specified division. Applies only when searching all records, divisions are enabled, and the user has the "Affected by Divisions" permission. |
language |
The filter language when Translation Workbench is used with startsWith or contains. Search terms must use that same language. |
queue |
The name of the associated queue. This is a top-level ListView element, not the queue-sharing member of the SharedTo helper. |
sharedTo |
Access to a shared list view. Important targets include group, role, roleAndSubordinates, roleAndSubordinatesInternal, territory, and territoryAndSubordinates. Public list views omit this element. |
Behavior and Constraints
Visibility and sharing targets
Public list views omit sharedTo; shared list views include it. The sharing targets determine who can access the view. They do not define record-sharing rules or replace filterScope and filters.
-
groupnames groups, androlenames roles. -
roleAndSubordinatesincludes subordinate roles and can include portal accounts below the specified roles. It is available only when digital experiences is enabled and Experience Cloud site users have external account roles other than a shared person account role. -
roleAndSubordinatesInternalincludes the specified roles and subordinate roles. -
territoryshares with specified territories.territoryAndSubordinatesalso includes subordinate territories. For Sales Territories, usemodelName.territoryName, wheremodelNameis the active territory model's API name andterritoryNameis the territory's API name.
Do not assume that every member of the shared SharedTo helper applies to ListView. Its guestUser member is restricted to SharingGuestRule. Its queue member is documented only for lead, case, and custom-object sharing rules. Neither establishes queue-based view sharing through sharedTo, and neither should be confused with the top-level ListView.queue element.
Record-selection scope
filterScope establishes the record-selection context independently of the individual filter conditions:
-
Everythingselects all records in scope.Mineselects records owned by the user running the view. -
MineAndMyGroupsincludes the user's own records and records assigned to the user's queues. -
Queueselects records assigned to a queue; the top-levelqueueelement names the associated queue. -
AssignedToMeselects records assigned to the user and is supported only forServiceAppointment. -
Delegatedselects records delegated to another user for action, such as delegated tasks. -
MyTerritoryandMyTeamTerritoryrequire territory management.MyTerritoryselects records in the user's territory;MyTeamTerritoryselects records in the user's team's territory. Opportunities cannot useMyTerritory. -
Teamcorresponds to "My team's opportunities" in Lightning Experience.SalesTeamcorresponds to "My opportunity teams" and selects opportunities assigned to an opportunity team. These scopes are not interchangeable. -
ScopingRuleselects records meeting a scoping rule's criteria. In Lightning Experience, scoping rules apply to list views only when the user selects "Filter by scope."
Filter logic and language
booleanFilter refers to numbered filter line items. For example, (1 AND 2) OR 3 selects records matching both the first two conditions or the third condition. Reordering entries in filters can therefore change the meaning of an unchanged expression.
Two views with the same filter line items can behave differently because of division or language. The division restriction applies only when searching all records under the division and permission conditions described above. When Translation Workbench is used with startsWith or contains, search values must be in the language specified by language.
Column identifiers
Do not mechanically replace list-view column identifiers with ordinary field API names. With person accounts enabled, standard contact fields merged into Account use PC_ column identifiers rather than their Person-prefixed API names. For example, PC_Email is the list-view column identifier corresponding to PersonEmail.
Deployment and Retrieval
ListView is contained within an object component, including when the object is standard. The ListView metadata reference explicitly excludes "Visible only to me" views from Metadata API access. Their absence from a retrieve is not evidence that the users have no personal views.
ListView does not support the * wildcard in package.xml. Select explicit object-qualified members under the ListView type, such as MyObject__mdt.My_View for a custom metadata type view.
Creating, updating, and deleting through Metadata API requires fullName. The required label supplies the displayed name; it is not the metadata identity.
Creating a queue automatically creates a corresponding list view. This automatic creation does not establish that the generated view copies every column, filter, or sharing setting from a separately configured source view.
Avoid including unedited default list views in managed packages. Including modified default views is also discouraged because it can produce duplicate list views in the target org. Duplicates can cause the incorrect list view to load.
Relationships
Column references and filter-field references are separate dependencies. A field can determine which records qualify without appearing as a displayed column. The containing CustomObject connects to the view through listViews, separately from the view's outgoing column references. Lightning page configuration can also depend on a particular view.
References
-
CustomField:columns,fieldwithinfilters. -
CustomObject:columns. -
Group:groupwithinsharedTo. -
Queue: top-levelqueue. -
Role:role,roleAndSubordinates,roleAndSubordinatesInternalwithinsharedTo. -
TerritoryModel:territory,territoryAndSubordinateswithinsharedTo.
Referenced By
-
FlexiPage:value.
Documentation Inconsistencies
- The
ListViewFilterreference table calls the field-identifier memberfilter, but the schema and XML example name itfield. Usefieldinside eachfiltersentry. - The
filterScopeenumeration defines values such asEverythingandMine, while illustrative XML uses lowercaseeverythingandmine. Preserve the documented enumeration spelling. - The
SharedToreference mentions metadata for private list views, but theListViewdefinition explicitly excludes views restricted to "Visible only to me" from Metadata API. The helper's general note does not establish retrieval support for those personal views.
Reported Issues
-
An invalid custom metadata type view can block the Manage interface. In November 2024, an admin reported that entering two values in one filter value box caused
DisjunctionsNotSupportedExceptionwhen the affected view opened. The author recovered by creating a corrected view with the same exact name in a sandbox and deploying it through a change set. This report concerns that custom metadata type view; it does not establish a general prohibition onORexpressions in ordinary object list views. See the invalid custom metadata view discussion. -
A missing-view error can prevent a scratch-org source pull. In a 2018 report, the pull failed with
Entity of type 'ListView' named 'Note_Relation__c.My_Notes' cannot be found, although the author could not find that view in the org. Adding the metadata member nameNote_Relation__c.My_Notesto.forceignoreallowed the pull to proceed after a file-path entry had failed. This was a reported exclusion workaround, not a repair of the missing view. See the source-pull error discussion. -
Custom metadata type retrieval reports differ on whether the view needs a separate retrieve. A 2018 answer reported that retrieving a custom metadata type or custom setting together with its list view omitted the view, and that a separate explicit
ListViewretrieve returned an object file containing it. A 2022 response in the same discussion reported retrieving "Visible to All" views through the parentCustomObject, while personal views remained excluded. These reports do not establish a universal requirement to retrieve such views separately. See the custom metadata list-view retrieval discussion. -
A folder-based editor retrieve may behave differently from a command-line retrieve for exclusions. In a 2022 report,
.forceignorepatterns excluded list-view files during command-line retrieval but not during the editor's folder-based "Retrieve Source from Org" action. The accepted answer attributed the difference to the editor extension's retrieval path not applying those exclusions. See the list-view exclusion discussion. - System Administrator access did not expose other users' personal views for an audit. In a 2019 report, SOQL and Bulk API returned public views, while a REST lookup using another user's known personal-view ID returned a resource-not-found response. The answer reported that another user could not query views marked "Visible only to me." This is consistent with, but broader than, the documented Metadata API exclusion. See the personal list-view access discussion.
Common Questions
Why are personal list views missing from my metadata retrieve?
Views restricted to "Visible only to me" are associated with a particular user and are inaccessible through Metadata API. A metadata retrieve therefore does not provide a complete inventory of personal views.
Can I retrieve all ListView components with a wildcard in package.xml?
No. ListView does not support the * wildcard. Select explicit object-qualified members under the ListView type.
Why does my Account list view use PC_Email instead of PersonEmail?
List-view column identifiers do not always match field API names. With person accounts enabled, merged standard contact fields use PC_ identifiers in columns; PC_Email corresponds to the PersonEmail API field.
What is the difference between Team and SalesTeam in filterScope?
Team corresponds to "My team's opportunities" in Lightning Experience. SalesTeam corresponds to "My opportunity teams" and selects opportunities assigned to an opportunity team.
How can I fix a custom metadata list view that blocks Manage?
For the reported DisjunctionsNotSupportedException case, the author created a corrected view with the same exact name in a sandbox and deployed it through a change set. That is a reported recovery method for the affected custom metadata type view, not a general restriction on ordinary list-view filter logic.