2

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

jasonscript
  • 6,039
  • 3
  • 28
  • 43

1 Answers1

2

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

  • 1
    I created an issue in github page, lets see their response. https://github.com/MicrosoftDocs/powerapps-docs/issues/1621 – Arun Vinoth-Precog Tech - MVP Jul 27 '20 at 17:10
  • My CRM version updated to 9.1.0000.21041 and the query is working as expected. I'll accept your answer because it was indeed a CRM bug, although your github issue has not been resolved – jasonscript Aug 14 '20 at 05:17