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 as AllAccounts.
  • 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’s data property or error property. If a function is decorated with @wire, the results are returned in an object with a data property and an error property.

You can also pass the parameters listed in this Request Parameters table. See an example in the Usage section.

The records that are returned contain the fields specified by:

  • The list view metadata, specified by data.info.displayColumns.

  • The fields and optionalFields 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, and SystemModstamp.

When iterating through the previous or next set of data, consider these guidelines:

  • Use the nextPageToken and previousPageToken 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.

  • 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’s data property or error property. If a function is decorated with @wire, the results are returned in an object with a data property and an error property.

You can also pass the parameters listed in this Request Parameters table.

The records that are returned contain the fields specified by:

  • The list view metadata, specified by data.info.displayColumns.

  • The fields and optionalFields 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, and SystemModstamp.

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.

  • 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’s data property or error property. If a function is decorated with @wire, the results are returned in an object with a data property and an error property.

You can also pass the parameters listed in this Request Parameters table.

The records that are returned contain the fields specified by:

  • The list view metadata, specified by data.info.displayColumns.

  • The fields and optionalFields 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, and SystemModstamp.

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.

  • 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’s data property or error property. If a function is decorated with @wire, the results are returned in an object with a data property and an error property.

You can also pass the parameters listed in this Request Parameters table.

The records that are returned contain the fields specified by:

  • The list view metadata, specified by data.info.displayColumns.

  • The fields and optionalFields 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, and SystemModstamp.

See Also