RenderListDataAsStream pnp

I know normally the Sortfield should be inside the caml-query body. But SharePoint does not longer work like that. If you have many, many items in a list [>100k] and you want to order the list by something, the OrderBy attribut in the Camlquery does no longer work. Instead you get a throtteling-error. You can reproduce that behavior if you create a View in the List and in the View itself, set a Sortfield [other than ID] and the View will no longer work.
But if you let the View still sort by ID the view "works" and you can order by clicking in the UI. In the background the UI than calls the RenderListDataAsStream endpoint and adds the URL-Parameters: &SortField=xxxxx&SortDir=Desc
This way you get results instead of the throtteling-error.

Category

  • Enhancement
  • Bug
  • Question
  • Documentation gap/issue

Version

Please specify what version of the library you are using: [2.6.0 ]

Please specify what version[s] of SharePoint you are targeting: [ online ]

Expected / Desired Behavior / Question

Add the new URL parameters to the IRenderListDataParameters of the "_List"-Class so results of big lists can still be sorted.

Observed Behavior

The RenderListDataAsStream endpoint returns a throtteling-error

Steps to Reproduce

Make a RenderListDataAsStream call in a big list/library [e.g. top 30, paged, the list should contain >100k items] and sort with an field [other than ID] via camlquery. In my experience, it doesn't matter if the field is indexed [if there are so many items in the list you want to return], but for the "best-case" just make it an indexed field in the list.

Video liên quan

Chủ Đề