sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

CAML's AddAllFields parameter breaks `Author` and `Editor` field

Open RoelVB opened this issue 2 years ago • 3 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

SharePoint REST API

Developer environment

None

What browser(s) / client(s) have you tested

  • [ ] 💥 Internet Explorer
  • [ ] 💥 Microsoft Edge
  • [ ] 💥 Google Chrome
  • [ ] 💥 FireFox
  • [ ] 💥 Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

SharePoint API

Describe the bug / error

When setting the parameter AddAllFields: true when doing a CAML request, it returns a Author and Editor property with an incorrect title, email and sip property

Steps to reproduce

Call RenderListDataAsStream with the body:

{"parameters":{"__metadata":{"type":"SP.RenderListDataParameters"},"AddAllFields":true}}

This will return a strange Author and Editor property:

{
  "Author": [{"id":"7","title":"7","email":"7","sip":"7","picture":""}],
  "Editor": [{"id":"7","title":"0","email":"7","sip":"1.0","picture":""}],
}

Expected behavior

When specifically requesting the Author and Editor fields like this:

{"parameters":{"__metadata":{"type":"SP.RenderListDataParameters"},"ViewXml":"<View><ViewFields><FieldRef Name='Author' /><FieldRef Name='Editor' /></ViewFields></View>"}}

We get the expected response:

{
  "Author": [{"id":"7","title":"Roel","email":"[email protected]","sip":"[email protected]","picture":""}],
  "Editor": [{"id":"7","title":"Roel","email":"[email protected]","sip":"[email protected]","picture":""}],
}

RoelVB avatar Nov 30 '23 14:11 RoelVB

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Nov 30 '23 14:11 ghost

I did some additional testing on two other tenants and could not reproduce this issue there.

My initial tests where on a development tenant. I assume this tenant is probably ahead in terms of updates?

RoelVB avatar Nov 30 '23 14:11 RoelVB

This seems to be happening in any SharePoint environment!

I'm pretty sure this is related to the number of peoplepickers in a single list. This first few will work as expected, but when you have over 12 (I didn't verify this number) peoplepickers in one list the rest of them will return the user's id for every property.

RoelVB avatar Feb 07 '24 09:02 RoelVB

Thank you for taking the time to file an issue. We periodically archive older or inactive issues as part of our issue management process, which automatically closes them once they are archived.

If you’d like to understand more about why and how we handle archived (closed) issues, please see Our approach to closed issues.

We appreciate your contribution and if this is still an active issue with the latest SPFx versions, please do resubmit the details. We needed to perform a cleanup, so that we can start with a clean table with a new process. We apologize for the inconvenience this might cause.

github-actions[bot] avatar May 03 '25 16:05 github-actions[bot]

This is still an issue!

RoelVB avatar May 06 '25 05:05 RoelVB