-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoadItemsByCamlQueryAsync not working with FolderServerRelativeUrl #1415
Comments
@mortenfa : can you try to include the folder filtering in your CAML query, see #839 for some inspiration on how to do so. There's also a limitation with the used SharePoint API on special chars in the provided folder, so in my opinion it's anyhow better to implement this at CAML level. See also the notes of the related docs: https://pnp.github.io/pnpcore/using-the-sdk/listitems-intro.html#c-getting-list-items-via-the-loaditemsbycamlquery-approach |
@mortenfa : did you manage to get unblocked? |
not yet, I'll take a look in the weekend 😊👍 |
@jansenbe : Still not working. Getting this quite unusable error: "SharePoint Rest service exception" "Cannot complete this action. Please try again." with this rowLimit:500 :
|
@bajce : yes, tried that also |
Category
Describe the bug
When querying with LoadItemsByCamlQueryAsync on a semi large list (10000 items) querying a specific folder throws REST exception
Steps to reproduce
This is working
var viewXml = $@"<View Scope='RecursiveAll'><RowLimit Paged='TRUE'>{rowLimit}</RowLimit><Where><Eq><FieldRef Name='FSObjType' /><Value Type='Integer'>1</Value></Eq></Where><ViewFields><FieldRef Name='ID' /><FieldRef Name='FileRef' /></ViewFields></View>";
await sourceList.LoadItemsByCamlQueryAsync(new CamlQueryOptions() { ViewXml = viewXml, PagingInfo = nextPage }
This throws the item limit exception with the same viewXml
await sourceList.LoadItemsByCamlQueryAsync(new CamlQueryOptions() { ViewXml = viewXml, FolderServerRelativeUrl = sourceList.RootFolder.ServerRelativeUrl + "/Testfolder", PagingInfo = nextPage });
Expected behavior
Results
Environment details (development & target environment)
Visual Studio latest version
Additional context
Thanks for your contribution! Sharing is caring.
The text was updated successfully, but these errors were encountered: