retrieveMultipleRecords

Retrieves a collection of table records.

Available for

Model-driven apps & portals.

Syntax

context.webAPI.retrieveMultipleRecords(entityLogicalName, options, maxPageSize).then(successCallback, errorCallback);

Parameters

Name Type Required Description
entityLogicalName String Yes The table logical name of the records you want to retrieve. For example: "account".
options String No

OData system query options or FetchXML query to retrieve your data.

  • Following system query options are supported: $select, $top, $filter, $expand, and $orderby.
  • To specify a FetchXML query, use the fetchXml column to specify the query.

NOTE: You must always use the $select system query option to limit the properties returned for a table record by including a comma-separated list of property names. Limiting the columns you retrieve is an important performance best practice. If properties aren't specified using $select, all properties will be returned.

You specify the query options starting with ?. You can also specify multiple system query options by using & to separate the query options.

maxPageSize Number No

Specify a positive number that indicates the number of table records to be returned per page. If you do not specify this parameter, the default value is passed as 5000.

If the number of records being retrieved is more than the specified maxPageSize value, nextLink column in the returned promise object will contain a link to retrieve the next set of tables.

successCallback Function No

A function to call when table records are retrieved. An object with the following columns is passed to the function:

  • entities: An array of JSON objects, where each object represents the retrieved table record containing columns and their values as key: value pairs. The Id of the table record is retrieved by default.
  • nextLink: String. If the number of records being retrieved is more than the value specified in the maxPageSize parameter in the request, this column returns the URL to return next set of records.
errorCallback Function No A function to call when the operation fails.

Return Value

Type: Promise<RetrieveMultipleResponse>

Description: The RetrieveMultipleResponse returns a promise that contains an array of JSON objects containing the retrieved table records and the nextLink parameter with the URL pointing to next set of records in case paging (maxPageSize) is specified in the request, and the record count returned exceeds the paging value. It has the following parameters:

parameter Return Value Description
entities Entity[] An array of JSON objects, where each object represents the retrieved table record containing columns and their values.
nextLink string If the number of records being retrieved is more than the value specified in the 'maxPageSize' parameter in the request, this parameter returns the URL to return next set of records.

Web API
Power Apps component framework API reference
Power Apps component framework overview