2
votes

Edit 2

It was a Microsoft bug. My CRM updated recently and the query is now executing as expected

Server version: 9.1.0000.21041

Client version: 1.4.1144-2007.3

Edit

If it is a Microsoft bug, which looks likely thanks to Arun's research, then for future reference, my CRM versions are

Server version: 9.1.0000.20151

Client version: 1.4.1077-2007.1

Original question below


I followed the example as described in the MSDN Documentation here.

Specify a positive number that indicates the number of entity records to be returned per page. If you do not specify this parameter, the value is defaulted to the maximum limit of 5000 records.

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

However, it doesn't appear to be working for me. Here's my sample JavaScript code:

Xrm.WebApi.retrieveMultipleRecords('account', '?$select=name', 20).then
(
    result => console.log(result.entities.length),
    error => console.error(error.message)
);
  • You can see that my query doesn't include any complex filter or expand expressions
  • maxPageSize is 20

When I run this code, it's returning the full set of results, not limiting the page size at all:

Bad Results

1

1 Answers

2
votes

I noticed this too, but this happens only in UCI. Whereas this issue wont be reproduced when you run the same code in classic web UI.

Probably this is a bug in MS side, pls create a ticket so they can fix it.

UCI

enter image description here

Classic

enter image description here