Closed mortenfa closed 7 months ago
@mortenfa : using the current version of PnP Core SDK I'm seeing both fields returned for my test list
Using LoadListDataAsStream:
Using LoadItemsByCamlQuery:
@mortenfa : also tested this with a doc library and there both methods do return these fields as well. Do you see the same on smaller lists/libraries?
Strange. Yes, I am testing on a small doc lib with 150 items. I haven't implemented the Expression
@mortenfa : Expression is not required for the CAML query and not possible for the LoadListDataAsStream method. With "smaller" I meant returning only a few columns versus the 60+ from the screenshot
Ahh ok, I'll check 👍
@jansenbe : You're right, Just created an empty doc lib w/o content types enabled, Same query gives this
I may have to go another way since all our sites have the content types enabled.
Thanks
I don't think this is an SDK issue, it more feels like a limitation of the used APIs...you're good with closing this one for now @mortenfa ?
I think you're right, and sure, thanks again 👍
Category
Describe the bug
When using CAML query and LoadListDataAsStreamAsync the result is missing fields. Looks like the same problem as https://github.com/pnp/pnpcore/issues/396 But the solution is not working for me.
The result only contains list custom fields. Not system fields . Specifically the FileLeafRef and FileRef fields.
I've also tried with LoadItemsByCamlQueryAsync with the same result
Steps to reproduce
This code
` $@"
` var output = await sourceList.LoadListDataAsStreamAsync(new PnP.Core.Model.SharePoint.RenderListDataOptions() { ViewXml = viewXml, RenderOptions = RenderListDataOptionsFlags.ListData });
foreach (var listItem in sourceList.Items.AsRequested()) { if (listItem.FileSystemObjectType == PnP.Core.Model.SharePoint.FileSystemObjectType.File) { files.Add(listItem); } }`
Expected behavior
Access to the item fields including system fields
Environment details (development & target environment)
Windows 11, Visual Studio 2022, .NET 7 web api
Thanks for your contribution! Sharing is caring.