getListUi
(Deprecated)
Use this wire adapter to get the records and metadata for a list view.
As a deprecated feature, getListUi
no longer updates and isn’t part of the “Services” under your Main Services Agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. getListUi
is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature.
Use the getListInfoByName
wire adapter.
See Get List View Records and Metadata.
objectApiName
—(Required) The API name of a supported object.listViewApiName
—(Required) The API name of a list view, such asAllAccounts
.
Read the data that's returned by the wire adapter using a property or function.
propertyOrFunction
—A private property or function that receives the stream of data from the wire service.
- If a property is decorated with
@wire
, the results are returned to the property’sdata
property orerror
property. - If a function is decorated with
@wire
, the results are returned in an object with adata
property and anerror
property.
You can also pass the parameters listed in this Request Parameters table. See an example in the Usage section.
data
—List UIerror
—FetchResponse
The records that are returned contain the fields specified by:
-
The list view metadata, specified by
data.info.displayColumns
. -
The
fields
andoptionalFields
parameters.The underlying list view is controlled by the administrator so it may change. If a component requires fields, request them in the
fields
parameter. Don’t assume that specific fields will be returned unless you explicitly request them. If you’re not sure whether the context user has access to a field and you don’t want the request to fail if they don’t, use the optionalFields parameter. -
The object’s system fields, if the object has them, such as
CreatedDate
,Id
,LastModifiedById
,LastModifiedDate
, andSystemModstamp
.
When iterating through the previous or next set of data, consider these guidelines:
- Use the
nextPageToken
andpreviousPageToken
values. - You can’t use
pageToken
values across sessions or across page refreshes. Persisting and reusing page tokens across page refreshes isn’t guaranteed to work.
This example displays 10 contact names from a list view and lets users click through the previous and next set of data.
When a user clicks the Previous and Next buttons, the pageToken
parameter is updated to the previousPageToken
and nextPageToken
values from the data the wire service provisioned. Because pageToken
is prepended with $
, when its value changes the wire service provisions new data.
The wireListViewToken
example is based on the wireListView
component in the lwc-recipes
GitHub repo.
Return list view records and metadata using the list view ID.
See Get List View Records and Metadata.
listViewId
—(Required) The ID of a list view.
Read the data that's returned by the wire adapter using a property or function.
propertyOrFunction
—A private property or function that receives the stream of data from the wire service.
- If a property is decorated with
@wire
, the results are returned to the property’sdata
property orerror
property. - If a function is decorated with
@wire
, the results are returned in an object with adata
property and anerror
property.
You can also pass the parameters listed in this Request Parameters table.
data
—List UIerror
—FetchResponse
The records that are returned contain the fields specified by:
-
The list view metadata, specified by
data.info.displayColumns
. -
The
fields
andoptionalFields
parameters.The underlying list view is controlled by the administrator so it may change. If a component requires fields, request them in the
fields
parameter. Don’t assume that specific fields will be returned unless you explicitly request them. If you’re not sure whether the context user has access to a field and you don’t want the request to fail if they don’t, use the optionalFields parameter. -
The object’s system fields, if the object has them, such as
CreatedDate
,Id
,LastModifiedById
,LastModifiedDate
, andSystemModstamp
.
Returns record data for an object’s most recently used (MRU) list view.
See Get Most Recently Used List View Records.
objectApiName
—(Required) The API name of a supported object.listViewApiName
—(Required) The API name of the MRU list view.
Read the data that's returned by the wire adapter using a property or function.
propertyOrFunction
—A private property or function that receives the stream of data from the wire service.
- If a property is decorated with
@wire
, the results are returned to the property’sdata
property orerror
property. - If a function is decorated with
@wire
, the results are returned in an object with adata
property and anerror
property.
You can also pass the parameters listed in this Request Parameters table.
data
—MRU List UI Representationerror
—FetchResponse
The records that are returned contain the fields specified by:
-
The list view metadata, specified by
data.info.displayColumns
. -
The
fields
andoptionalFields
parameters.The underlying list view is controlled by the administrator so it may change. If a component requires fields, request them in the
fields
parameter. Don’t assume that specific fields will be returned unless you explicitly request them. If you’re not sure whether the context user has access to a field and you don’t want the request to fail if they don’t, use the optionalFields parameter. -
The object’s system fields, if the object has them, such as
CreatedDate
,Id
,LastModifiedById
,LastModifiedDate
, andSystemModstamp
.
Returns a collection of list views associated with an object.
See Get List Views for an Object.
objectApiName
—(Required) The API name of a supported object.
Read the data that's returned by the wire adapter using a property or function.
propertyOrFunction
—A private property or function that receives the stream of data from the wire service.
- If a property is decorated with
@wire
, the results are returned to the property’sdata
property orerror
property. - If a function is decorated with
@wire
, the results are returned in an object with adata
property and anerror
property.
You can also pass the parameters listed in this Request Parameters table.
data
—List View Summary Collectionerror
—FetchResponse
The records that are returned contain the fields specified by:
-
The list view metadata, specified by
data.info.displayColumns
. -
The
fields
andoptionalFields
parameters.The underlying list view is controlled by the administrator so it may change. If a component requires fields, request them in the
fields
parameter. Don’t assume that specific fields will be returned unless you explicitly request them. If you’re not sure whether the context user has access to a field and you don’t want the request to fail if they don’t, use the optionalFields parameter. -
The object’s system fields, if the object has them, such as
CreatedDate
,Id
,LastModifiedById
,LastModifiedDate
, andSystemModstamp
.
See Also
- Understand the Wire Service
- Handle Errors in Lightning Data Service
- Salesforce Objects Supported by lightning/ui*Api Modules
- getListInfoByName