Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

executeListView()

Executes a list view’s SOQL query to retrieve data, labels, and actions from a list view.

Syntax

1ExecuteListViewResult result = connection.executeListView(ExecuteListViewResult request);

Usage

The executeListView() call takes an ExecuteListViewRequest object, executes the SOQL query for the list view, and returns the resulting data and presentation information in an ExecuteListViewResult object. This call is available in API version 32.0 and later.

Sample Code—Java

1private void example(ApiProtocol protocol, AppVersion version) throws Exception {
2
3        // Get the list results via the list view API
4        EnterpriseConnection connection = makeClient(getUserUtil().getUserWithModifyAllData(), AppVersion.VERSION_190,
5                getName());
6        ExecuteListViewRequest request = new ExecuteListViewRequest();
7        request.setSobjectType("Account");
8        request.setDeveloperNameOrId(listViews[0].getId());
9        request.setLimit(50000);
10
11        com.sforce.soap.enterprise.ExecuteListViewResult result = connection.executeListView(request);
12    }

Arguments

Name Type Description
request ExecuteListViewRequest An object that specifies the list view and the limit, offset, and ordering of the results.

Response